]> git.pld-linux.org Git - packages/openssl.git/blobdiff - openssl_fix_for_x32.patch
up to 1.0.2g snapshot
[packages/openssl.git] / openssl_fix_for_x32.patch
index 70ead03cab5176d8dace1c0101977ec88ac0349c..5ae0b9b60ff08f587726a0a1dfb570d1532897c5 100644 (file)
@@ -1,59 +1,23 @@
-UpstreamStatus: Pending
 
-Received from H J Liu @ Intel
-Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
+obsolete now that this is applied?
+https://rt.openssl.org/Ticket/Display.html?id=3885
+https://github.com/openssl/openssl/commit/10c639a8a56c90bec9e332c7ca76ef552b3952ac
 
-ported the patch to the 1.0.0e version
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
-Index: openssl-1.0.0e/Configure
-===================================================================
---- openssl-1.0.0e.orig/Configure
-+++ openssl-1.0.0e/Configure
-@@ -393,6 +393,7 @@ my %table=(
- "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO $ENV{OPTFLAGS} -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO $ENV{OPTFLAGS} -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-x86_64",       "gcc:-m64 -DL_ENDIAN -DTERMIO $ENV{OPTFLAGS} -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
-+"linux-x32", "gcc:-mx32 -DL_ENDIAN -DTERMIO $ENV{OPTFLAGS} -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
- "linux64-s390x",      "gcc:-m64 -DB_ENDIAN -DTERMIO $ENV{OPTFLAGS} -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
- #### So called "highgprs" target for z/Architecture CPUs
- # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see
-Index: openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c
-===================================================================
---- openssl-1.0.0e.orig/crypto/bn/asm/x86_64-gcc.c
-+++ openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c
-@@ -55,7 +55,7 @@
-  *    machine.
-  */
--#ifdef _WIN64
-+#if defined _WIN64 || !defined __LP64__
- #define BN_ULONG unsigned long long
- #else
- #define BN_ULONG unsigned long
-@@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con
-       asm (
-       "       subq    %2,%2           \n"
-       ".p2align 4                     \n"
--      "1:     movq    (%4,%2,8),%0    \n"
--      "       adcq    (%5,%2,8),%0    \n"
--      "       movq    %0,(%3,%2,8)    \n"
-+      "1:     movq    (%q4,%2,8),%0   \n"
-+      "       adcq    (%q5,%2,8),%0   \n"
-+      "       movq    %0,(%q3,%2,8)   \n"
-       "       leaq    1(%2),%2        \n"
-       "       loop    1b              \n"
-       "       sbbq    %0,%0           \n"
-@@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con
-       asm (
-       "       subq    %2,%2           \n"
-       ".p2align 4                     \n"
--      "1:     movq    (%4,%2,8),%0    \n"
--      "       sbbq    (%5,%2,8),%0    \n"
--      "       movq    %0,(%3,%2,8)    \n"
-+      "1:     movq    (%q4,%2,8),%0   \n"
-+      "       sbbq    (%q5,%2,8),%0   \n"
-+      "       movq    %0,(%q3,%2,8)   \n"
-       "       leaq    1(%2),%2        \n"
-       "       loop    1b              \n"
-       "       sbbq    %0,%0           \n"
+--- openssl-1.0.2g/crypto/perlasm/x86_64-xlate.pl~     2016-02-24 19:39:13.000000000 +0200
++++ openssl-1.0.2g/crypto/perlasm/x86_64-xlate.pl      2016-02-25 21:01:20.464795948 +0200
+@@ -198,11 +198,15 @@
+       if ($gas) {
+           # Solaris /usr/ccs/bin/as can't handle multiplications
+           # in $self->{value}
++          if ($self->{value} =~ /0xA040608020C0E000/) {
++                  $self->{value} = "11547335547999543296";
++          } else {
+           my $value = $self->{value};
+           $value =~ s/(?<![\w\$\.])(0x?[0-9a-f]+)/oct($1)/egi;
+           if ($value =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg) {
+               $self->{value} = $value;
+           }
++          }
+           sprintf "\$%s",$self->{value};
+       } else {
+           $self->{value} =~ s/(0b[0-1]+)/oct($1)/eig;
This page took 0.109925 seconds and 4 git commands to generate.