# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../openssl/x32.patch # Copyright (C) 2016 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- When building on x32 systems where the default type is 32bit, make sure we can transparently represent 64bit integers. Otherwise we end up with build errors like: /usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890. ... ghash-x86_64.s: Assembler messages: ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression We don't enable this globally as there are some cases where we'd get 32bit values interpreted as unsigned when we need them as signed. Reported-by: Bertrand Jacquin URL: https://bugs.gentoo.org/542618 --- crypto/perlasm/x86_64-xlate.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index aae8288..0bf9774 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -195,6 +195,10 @@ my %globals; sub out { my $self = shift; + # When building on x32 ABIs, the expanded hex value might be too + # big to fit into 32bits. Enable transparent 64bit support here + # so we can safely print it out. + use bigint; if ($gas) { # Solaris /usr/ccs/bin/as can't handle multiplications # in $self->{value} -- 2.3.3