Ticket #47328: openssl-i386.patch

File openssl-i386.patch, 2.4 KB (added by larryv (Lawrence Velázquez), 9 years ago)
  • dports/devel/openssl/Portfile

    commit 95b510a5231b40e4f80e8f43c1b67a12298b0064
    Author: Lawrence Velázquez <larryv@macports.org>
    Date:   15 minutes ago
    
        openssl: Fix 64-bit builds that run 32-bit Perl (#47328)
        
        This definitely affects Leopard on Intel 64, and probably all 32-bit
        platforms.
    
    diff --git a/dports/devel/openssl/Portfile b/dports/devel/openssl/Portfile
    index 0844b4d..e7caccc 100644
    a b patchfiles patch-bn_internal.pod.diff \ 
    3939                    patch-crypto-Makefile.diff \
    4040                    patch-Makefile.org-parallel.diff
    4141
     42# Fix build on Leopard (#47328,
     43# <http://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=3759>)
     44patchfiles-append   use-perl-bigint.patch
     45
    4246# We've tried patching some, but we're not there yet, see #46719
    4347use_parallel_build  no
    4448
  • new file dports/devel/openssl/files/use-perl-bigint.patch

    diff --git a/dports/devel/openssl/files/use-perl-bigint.patch b/dports/devel/openssl/files/use-perl-bigint.patch
    new file mode 100644
    index 0000000..203a3a8
    - +  
     1When building on x32 systems where the default type is 32bit, make sure
     2we can transparently represent 64bit integers.  Otherwise we end up with
     3build errors like:
     4/usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s
     5Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890.
     6...
     7ghash-x86_64.s: Assembler messages:
     8ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
     9
     10We don't enable this globally as there are some cases where we'd get
     1132bit values interpreted as unsigned when we need them as signed.
     12
     13Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh>
     14URL: https://bugs.gentoo.org/542618
     15---
     16 crypto/perlasm/x86_64-xlate.pl | 4 ++++
     17 1 file changed, 4 insertions(+)
     18
     19diff --git crypto/perlasm/x86_64-xlate.pl crypto/perlasm/x86_64-xlate.pl
     20index aae8288..0bf9774 100755
     21--- crypto/perlasm/x86_64-xlate.pl
     22+++ crypto/perlasm/x86_64-xlate.pl
     23@@ -195,6 +195,10 @@ my %globals;
     24     sub out {
     25        my $self = shift;
     26 
     27+       # When building on x32 ABIs, the expanded hex value might be too
     28+       # big to fit into 32bits.  Enable transparent 64bit support here
     29+       # so we can safely print it out.
     30+       use bigint;
     31        if ($gas) {
     32            # Solaris /usr/ccs/bin/as can't handle multiplications
     33            # in $self->{value}
     34--
     352.3.3
     36