]> git.pld-linux.org Git - packages/openssl.git/blob - openssl_fix_for_x32.patch
70ead03cab5176d8dace1c0101977ec88ac0349c
[packages/openssl.git] / openssl_fix_for_x32.patch
1 UpstreamStatus: Pending
2
3 Received from H J Liu @ Intel
4 Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
5 Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
6
7 ported the patch to the 1.0.0e version
8 Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
9 Index: openssl-1.0.0e/Configure
10 ===================================================================
11 --- openssl-1.0.0e.orig/Configure
12 +++ openssl-1.0.0e/Configure
13 @@ -393,6 +393,7 @@ my %table=(
14  "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)",
15  "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)",
16  "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",
17 +"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",
18  "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",
19  #### So called "highgprs" target for z/Architecture CPUs
20  # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see
21 Index: openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c
22 ===================================================================
23 --- openssl-1.0.0e.orig/crypto/bn/asm/x86_64-gcc.c
24 +++ openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c
25 @@ -55,7 +55,7 @@
26   *    machine.
27   */
28  
29 -#ifdef _WIN64
30 +#if defined _WIN64 || !defined __LP64__
31  #define BN_ULONG unsigned long long
32  #else
33  #define BN_ULONG unsigned long
34 @@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con
35         asm (
36         "       subq    %2,%2           \n"
37         ".p2align 4                     \n"
38 -       "1:     movq    (%4,%2,8),%0    \n"
39 -       "       adcq    (%5,%2,8),%0    \n"
40 -       "       movq    %0,(%3,%2,8)    \n"
41 +       "1:     movq    (%q4,%2,8),%0   \n"
42 +       "       adcq    (%q5,%2,8),%0   \n"
43 +       "       movq    %0,(%q3,%2,8)   \n"
44         "       leaq    1(%2),%2        \n"
45         "       loop    1b              \n"
46         "       sbbq    %0,%0           \n"
47 @@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con
48         asm (
49         "       subq    %2,%2           \n"
50         ".p2align 4                     \n"
51 -       "1:     movq    (%4,%2,8),%0    \n"
52 -       "       sbbq    (%5,%2,8),%0    \n"
53 -       "       movq    %0,(%3,%2,8)    \n"
54 +       "1:     movq    (%q4,%2,8),%0   \n"
55 +       "       sbbq    (%q5,%2,8),%0   \n"
56 +       "       movq    %0,(%q3,%2,8)   \n"
57         "       leaq    1(%2),%2        \n"
58         "       loop    1b              \n"
59         "       sbbq    %0,%0           \n"
This page took 0.020704 seconds and 2 git commands to generate.