diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-05-27 21:51:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-30 22:26:13 +0100 |
commit | e092f1585b50b97038c59909dcc8ecb6ab019b75 (patch) | |
tree | b24ba4e77e977a768a73ae695ff331f7c5f246be /meta | |
parent | db3aafa5ae1ded1b3fe1a6dcd995e5a84dcf82cb (diff) | |
download | poky-e092f1585b50b97038c59909dcc8ecb6ab019b75.tar.gz |
openssl: Backport upstreamed version of patch to fix build on mips64
Previous patch had a concern as well and this is a direct backport of
the patch fixing the problem.
(From OE-Core rev: 3d48bb6d2d65d0837dcacc262633a55053652e5f)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 31 insertions, 54 deletions
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 deleted file mode 100644 index 46d1adf33b..0000000000 --- a/meta/recipes-connectivity/openssl/openssl/0001-Define-GCC_VERSION-macro-to-cover-upto-gcc-5.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 0aa68f7681a74f6ff80a80c5843bc35e5effffb9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 22 May 2015 12:43:39 -0700 | ||
4 | Subject: [PATCH] Define GCC_VERSION macro to cover upto gcc-5 | ||
5 | |||
6 | Current check is limited to gcc 4 with minor versions | ||
7 | but when we use gcc 5.1, then minor version check fails | ||
8 | with current setup and we end up with build errors like | ||
9 | |||
10 | | In file included from bn_div.c:62:0: | ||
11 | | bn_div.c: In function 'BN_div': | ||
12 | | bn_lcl.h:311:9: error: impossible constraint in 'asm' | ||
13 | | asm ("dmultu %2,%3" \ | ||
14 | | ^ | ||
15 | | bn_div.c:402:13: note: in expansion of macro 'BN_UMULT_LOHI' | ||
16 | | BN_UMULT_LOHI(t2l, t2h, d1, q); | ||
17 | | ^ | ||
18 | | <builtin>: recipe for target 'bn_div.o' failed | ||
19 | | make[2]: *** [bn_div.o] Error 1 | ||
20 | |||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | |||
23 | --- | ||
24 | Upstream-Status: [Submitted] | ||
25 | crypto/bn/bn_lcl.h | 5 ++++- | ||
26 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h | ||
29 | index 196df7e..e801ba7 100644 | ||
30 | --- a/crypto/bn/bn_lcl.h | ||
31 | +++ b/crypto/bn/bn_lcl.h | ||
32 | @@ -118,6 +118,9 @@ | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | +#define GCC_VERSION (__GNUC__ * 10000 \ | ||
37 | + + __GNUC_MINOR__ * 100 \ | ||
38 | + + __GNUC_PATCHLEVEL__) | ||
39 | /*- | ||
40 | * Bignum consistency macros | ||
41 | * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from | ||
42 | @@ -443,7 +446,7 @@ unsigned __int64 _umul128(unsigned __int64 a, unsigned __int64 b, | ||
43 | # endif | ||
44 | # elif defined(__mips) && (defined(SIXTY_FOUR_BIT) || defined(SIXTY_FOUR_BIT_LONG)) | ||
45 | # if defined(__GNUC__) && __GNUC__>=2 | ||
46 | -# if __GNUC__>=4 && __GNUC_MINOR__>=4 | ||
47 | +# if GCC_VERSION > 40400 | ||
48 | /* "h" constraint is no more since 4.4 */ | ||
49 | # define BN_UMULT_HIGH(a,b) (((__uint128_t)(a)*(b))>>64) | ||
50 | # define BN_UMULT_LOHI(low,high,a,b) ({ \ | ||
51 | -- | ||
52 | 2.1.4 | ||
53 | |||
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-bn-bn_lcl.h-fix-MIPS-specific-gcc-version-check.patch b/meta/recipes-connectivity/openssl/openssl/0001-bn-bn_lcl.h-fix-MIPS-specific-gcc-version-check.patch new file mode 100644 index 0000000000..7308f8fc3e --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/0001-bn-bn_lcl.h-fix-MIPS-specific-gcc-version-check.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 60c268b21ac81cc6b1af5c5470282a613b96f6fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Andy Polyakov <appro@openssl.org> | ||
3 | Date: Mon, 25 May 2015 10:17:14 +0200 | ||
4 | Subject: [PATCH] bn/bn_lcl.h: fix MIPS-specific gcc version check. | ||
5 | |||
6 | RT#3859 | ||
7 | |||
8 | Reviewed-by: Tim Hudson <tjh@openssl.org> | ||
9 | --- | ||
10 | Upstream-Status: Backport | ||
11 | |||
12 | crypto/bn/bn_lcl.h | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h | ||
16 | index 196df7e..b9d124a 100644 | ||
17 | --- a/crypto/bn/bn_lcl.h | ||
18 | +++ b/crypto/bn/bn_lcl.h | ||
19 | @@ -443,7 +443,7 @@ unsigned __int64 _umul128(unsigned __int64 a, unsigned __int64 b, | ||
20 | # endif | ||
21 | # elif defined(__mips) && (defined(SIXTY_FOUR_BIT) || defined(SIXTY_FOUR_BIT_LONG)) | ||
22 | # if defined(__GNUC__) && __GNUC__>=2 | ||
23 | -# if __GNUC__>=4 && __GNUC_MINOR__>=4 | ||
24 | +# if __GNUC__>4 || (__GNUC__>=4 && __GNUC_MINOR__>=4) | ||
25 | /* "h" constraint is no more since 4.4 */ | ||
26 | # define BN_UMULT_HIGH(a,b) (((__uint128_t)(a)*(b))>>64) | ||
27 | # define BN_UMULT_LOHI(low,high,a,b) ({ \ | ||
28 | -- | ||
29 | 2.1.4 | ||
30 | |||
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb index 5e767c3c2d..f4006f623a 100644 --- a/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb +++ b/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb | |||
@@ -36,7 +36,7 @@ SRC_URI += "file://configure-targets.patch \ | |||
36 | file://ptest-deps.patch \ | 36 | file://ptest-deps.patch \ |
37 | file://run-ptest \ | 37 | file://run-ptest \ |
38 | file://crypto_use_bigint_in_x86-64_perl.patch \ | 38 | file://crypto_use_bigint_in_x86-64_perl.patch \ |
39 | file://0001-Define-GCC_VERSION-macro-to-cover-upto-gcc-5.patch \ | 39 | file://0001-bn-bn_lcl.h-fix-MIPS-specific-gcc-version-check.patch \ |
40 | " | 40 | " |
41 | 41 | ||
42 | SRC_URI[md5sum] = "a06c547dac9044161a477211049f60ef" | 42 | SRC_URI[md5sum] = "a06c547dac9044161a477211049f60ef" |