[OE-core] [PATCH 1/3] openssl: Fix build with gcc5 on mips64
Khem Raj
raj.khem at gmail.com
Thu May 28 04:53:28 UTC 2015
On Mon, May 25, 2015 at 12:22 PM, Bernhard Reutner-Fischer
<rep.dot.nop at gmail.com> wrote:
> On May 22, 2015 9:56:51 PM GMT+02:00, Khem Raj <raj.khem at gmail.com> wrote:
>>Patch is submitted upstream as well
>>
>>Signed-off-by: Khem Raj <raj.khem at gmail.com>
>>---
>>...ine-GCC_VERSION-macro-to-cover-upto-gcc-5.patch | 53
>>++++++++++++++++++++++
>> .../recipes-connectivity/openssl/openssl_1.0.2a.bb | 1 +
>> 2 files changed, 54 insertions(+)
>>create mode 100644
>>meta/recipes-connectivity/openssl/openssl/0001-Define-GCC_VERSION-macro-to-cover-upto-gcc-5.patch
>>
>>diff --git
>>a/meta/recipes-connectivity/openssl/openssl/0001-Define-GCC_VERSION-macro-to-cover-upto-gcc-5.patch
>>b/meta/recipes-connectivity/openssl/openssl/0001-Define-GCC_VERSION-macro-to-cover-upto-gcc-5.patch
>>new file mode 100644
>>index 0000000..46d1adf
>>--- /dev/null
>>+++
>>b/meta/recipes-connectivity/openssl/openssl/0001-Define-GCC_VERSION-macro-to-cover-upto-gcc-5.patch
>>@@ -0,0 +1,53 @@
>>+From 0aa68f7681a74f6ff80a80c5843bc35e5effffb9 Mon Sep 17 00:00:00 2001
>>+From: Khem Raj <raj.khem at gmail.com>
>>+Date: Fri, 22 May 2015 12:43:39 -0700
>>+Subject: [PATCH] Define GCC_VERSION macro to cover upto gcc-5
>>+
>>+Current check is limited to gcc 4 with minor versions
>>+but when we use gcc 5.1, then minor version check fails
>>+with current setup and we end up with build errors like
>>+
>>+| In file included from bn_div.c:62:0:
>>+| bn_div.c: In function 'BN_div':
>>+| bn_lcl.h:311:9: error: impossible constraint in 'asm'
>>+| asm ("dmultu %2,%3" \
>>+| ^
>>+| bn_div.c:402:13: note: in expansion of macro 'BN_UMULT_LOHI'
>>+| BN_UMULT_LOHI(t2l, t2h, d1, q);
>>+| ^
>>+| <builtin>: recipe for target 'bn_div.o' failed
>>+| make[2]: *** [bn_div.o] Error 1
>>+
>>+Signed-off-by: Khem Raj <raj.khem at gmail.com>
>>+
>>+---
>>+Upstream-Status: [Submitted]
>>+ crypto/bn/bn_lcl.h | 5 ++++-
>>+ 1 file changed, 4 insertions(+), 1 deletion(-)
>>+
>>+diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h
>>+index 196df7e..e801ba7 100644
>>+--- a/crypto/bn/bn_lcl.h
>>++++ b/crypto/bn/bn_lcl.h
>>+@@ -118,6 +118,9 @@
>>+ extern "C" {
>>+ #endif
>>+
>>++#define GCC_VERSION (__GNUC__ * 10000 \
>>++ + __GNUC_MINOR__ * 100 \
>>++ + __GNUC_PATCHLEVEL__)
>>+ /*-
>>+ * Bignum consistency macros
>>+ * There is one "API" macro, bn_fix_top(), for stripping leading
>>zeroes from
>>+@@ -443,7 +446,7 @@ unsigned __int64 _umul128(unsigned __int64 a,
>>unsigned __int64 b,
>>+ # endif
>>+ # elif defined(__mips) && (defined(SIXTY_FOUR_BIT) ||
>>defined(SIXTY_FOUR_BIT_LONG))
>>+ # if defined(__GNUC__) && __GNUC__>=2
>>+-# if __GNUC__>=4 && __GNUC_MINOR__>=4
>>++# if GCC_VERSION > 40400
>
> Not that it would really matter nowadays, but this should likely be >=
you are right, I have sent another patch which actually is a backport
of what was applied upstream
More information about the Openembedded-core
mailing list