diff options
| author | Armin Kuster <akuster@mvista.com> | 2015-04-10 10:45:20 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-15 14:19:45 +0100 |
| commit | 1da17afed8ef82261228e216b4a7626067ef37a6 (patch) | |
| tree | 5b5f711a15e2803685f2df84ddf604b4cc2aab5b | |
| parent | 31b2c1ff883370aeef28aa9d1efe0e14f3685c21 (diff) | |
| download | poky-1da17afed8ef82261228e216b4a7626067ef37a6.tar.gz | |
crypto: use bigint in x86-64 perl
on some hosts openssl fails to build with this error:
ghash-x86_64.s: Assembler messages:
ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
backported fix from community.
(From OE-Core rev: 8230f873921d5c16106e3ebf57053a646bc6ad78)
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_1.0.2a.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch b/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch new file mode 100644 index 0000000000..c397af2f0e --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | Upsteram Status: Backport | ||
| 2 | |||
| 3 | When building on x32 systems where the default type is 32bit, make sure | ||
| 4 | we can transparently represent 64bit integers. Otherwise we end up with | ||
| 5 | build errors like: | ||
| 6 | /usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s | ||
| 7 | Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890. | ||
| 8 | ... | ||
| 9 | ghash-x86_64.s: Assembler messages: | ||
| 10 | ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression | ||
| 11 | |||
| 12 | We don't enable this globally as there are some cases where we'd get | ||
| 13 | 32bit values interpreted as unsigned when we need them as signed. | ||
| 14 | |||
| 15 | Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh> | ||
| 16 | URL: https://bugs.gentoo.org/542618 | ||
| 17 | |||
| 18 | Signed-off-By: Armin Kuster <akuster@mvista.com> | ||
| 19 | |||
| 20 | Index: openssl-1.0.2a/crypto/perlasm/x86_64-xlate.pl | ||
| 21 | =================================================================== | ||
| 22 | --- openssl-1.0.2a.orig/crypto/perlasm/x86_64-xlate.pl | ||
| 23 | +++ openssl-1.0.2a/crypto/perlasm/x86_64-xlate.pl | ||
| 24 | @@ -194,7 +194,10 @@ my %globals; | ||
| 25 | } | ||
| 26 | sub out { | ||
| 27 | my $self = shift; | ||
| 28 | - | ||
| 29 | + # When building on x32 ABIs, the expanded hex value might be too | ||
| 30 | + # big to fit into 32bits. Enable transparent 64bit support here | ||
| 31 | + # so we can safely print it out. | ||
| 32 | + use bigint; | ||
| 33 | if ($gas) { | ||
| 34 | # Solaris /usr/ccs/bin/as can't handle multiplications | ||
| 35 | # in $self->{value} | ||
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb index 74d69389c9..9a218be605 100644 --- a/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb +++ b/meta/recipes-connectivity/openssl/openssl_1.0.2a.bb | |||
| @@ -36,6 +36,7 @@ SRC_URI += "file://configure-targets.patch \ | |||
| 36 | file://Makefiles-ptest.patch \ | 36 | file://Makefiles-ptest.patch \ |
| 37 | file://ptest-deps.patch \ | 37 | file://ptest-deps.patch \ |
| 38 | file://run-ptest \ | 38 | file://run-ptest \ |
| 39 | file://crypto_use_bigint_in_x86-64_perl.patch \ | ||
| 39 | " | 40 | " |
| 40 | 41 | ||
| 41 | SRC_URI[md5sum] = "a06c547dac9044161a477211049f60ef" | 42 | SRC_URI[md5sum] = "a06c547dac9044161a477211049f60ef" |
