diff options
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch | 76 |
1 files changed, 36 insertions, 40 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch index ab1434a0e7..59a4b7ce9a 100644 --- a/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch +++ b/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch | |||
@@ -9,22 +9,24 @@ Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01 | |||
9 | 9 | ||
10 | ported the patch to the 1.0.0m version | 10 | ported the patch to the 1.0.0m version |
11 | Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> 2015/03/24 | 11 | Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> 2015/03/24 |
12 | Index: openssl-1.0.1e/Configure | 12 | |
13 | =================================================================== | 13 | Ported the patch to 1.0.1t version. |
14 | --- openssl-1.0.1e.orig/Configure | 14 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> 2016/05/09 |
15 | +++ openssl-1.0.1e/Configure | 15 | --- |
16 | @@ -402,6 +402,7 @@ my %table=( | 16 | diff -ruN a/Configure b/Configure |
17 | --- a/Configure 2016-05-04 08:24:51.630028856 +0200 | ||
18 | +++ b/Configure 2016-05-04 09:09:14.987332751 +0200 | ||
19 | @@ -417,6 +417,7 @@ | ||
17 | "linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -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)", | 20 | "linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -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)", |
18 | "linux-ia64-icc","icc:-DL_ENDIAN -O2 -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)", | 21 | "linux-ia64-icc","icc:-DL_ENDIAN -O2 -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)", |
19 | "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -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", | 22 | "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -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", |
20 | +"linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -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", | 23 | +"linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -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", |
24 | "linux-x86_64-clang","clang: -m64 -DL_ENDIAN -O3 -Wall -Qunused-arguments::-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", | ||
21 | "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -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", | 25 | "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -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", |
22 | #### So called "highgprs" target for z/Architecture CPUs | 26 | #### So called "highgprs" target for z/Architecture CPUs |
23 | # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see | 27 | diff -ruN a/crypto/bn/asm/x86_64-gcc.c b/crypto/bn/asm/x86_64-gcc.c |
24 | Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | 28 | --- a/crypto/bn/asm/x86_64-gcc.c 2016-05-03 15:49:00.000000000 +0200 |
25 | =================================================================== | 29 | +++ b/crypto/bn/asm/x86_64-gcc.c 2016-05-04 09:07:52.974863300 +0200 |
26 | --- openssl-1.0.1e.orig/crypto/bn/asm/x86_64-gcc.c | ||
27 | +++ openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | ||
28 | @@ -55,7 +55,7 @@ | 30 | @@ -55,7 +55,7 @@ |
29 | * machine. | 31 | * machine. |
30 | */ | 32 | */ |
@@ -34,30 +36,8 @@ Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | |||
34 | # define BN_ULONG unsigned long long | 36 | # define BN_ULONG unsigned long long |
35 | # else | 37 | # else |
36 | # define BN_ULONG unsigned long | 38 | # define BN_ULONG unsigned long |
37 | Index: openssl-1.0.1e/crypto/bn/bn.h | ||
38 | =================================================================== | ||
39 | --- openssl-1.0.1e.orig/crypto/bn/bn.h | ||
40 | +++ openssl-1.0.1e/crypto/bn/bn.h | ||
41 | @@ -173,6 +173,13 @@ extern "C" { | ||
42 | # endif | ||
43 | # endif | ||
44 | |||
45 | +/* Address type. */ | ||
46 | +# ifdef _WIN64 | ||
47 | +# define BN_ADDR unsigned long long | ||
48 | +# else | ||
49 | +# define BN_ADDR unsigned long | ||
50 | +# endif | ||
51 | + | ||
52 | /* | ||
53 | * assuming long is 64bit - this is the DEC Alpha unsigned long long is only | ||
54 | * 64 bits :-(, don't define BN_LLONG for the DEC Alpha | ||
55 | Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | ||
56 | =================================================================== | ||
57 | --- openssl-1.0.1m/crypto/bn/asm/x86_64-gcc.c 2015-03-19 13:37:10.000000000 +0000 | ||
58 | +++ openssl-1.0.1m-modif/crypto/bn/asm/x86_64-gcc.c 2015-04-14 17:09:11.876533194 +0100 | ||
59 | @@ -211,9 +211,9 @@ | 39 | @@ -211,9 +211,9 @@ |
60 | 40 | ||
61 | asm volatile (" subq %2,%2 \n" | 41 | asm volatile (" subq %2,%2 \n" |
62 | ".p2align 4 \n" | 42 | ".p2align 4 \n" |
63 | - "1: movq (%4,%2,8),%0 \n" | 43 | - "1: movq (%4,%2,8),%0 \n" |
@@ -70,7 +50,7 @@ Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | |||
70 | " loop 1b \n" | 50 | " loop 1b \n" |
71 | " sbbq %0,%0 \n":"=&a" (ret), "+c"(n), | 51 | " sbbq %0,%0 \n":"=&a" (ret), "+c"(n), |
72 | @@ -235,9 +235,9 @@ | 52 | @@ -235,9 +235,9 @@ |
73 | 53 | ||
74 | asm volatile (" subq %2,%2 \n" | 54 | asm volatile (" subq %2,%2 \n" |
75 | ".p2align 4 \n" | 55 | ".p2align 4 \n" |
76 | - "1: movq (%4,%2,8),%0 \n" | 56 | - "1: movq (%4,%2,8),%0 \n" |
@@ -81,12 +61,11 @@ Index: openssl-1.0.1e/crypto/bn/asm/x86_64-gcc.c | |||
81 | + " movq %0,(%q3,%2,8) \n" | 61 | + " movq %0,(%q3,%2,8) \n" |
82 | " leaq 1(%2),%2 \n" | 62 | " leaq 1(%2),%2 \n" |
83 | " loop 1b \n" | 63 | " loop 1b \n" |
84 | " sbbq %0,%0 \n":"=&a" (ret), "+c"(n) | 64 | " sbbq %0,%0 \n":"=&a" (ret), "+c"(n), |
85 | Index: openssl-1.0.1e/crypto/bn/bn_exp.c | 65 | diff -ruN a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c |
86 | =================================================================== | 66 | --- a/crypto/bn/bn_exp.c 2016-05-03 15:49:00.000000000 +0200 |
87 | --- openssl-1.0.1e.orig/crypto/bn/bn_exp.c | 67 | +++ b/crypto/bn/bn_exp.c 2016-05-04 09:07:52.974863300 +0200 |
88 | +++ openssl-1.0.1e/crypto/bn/bn_exp.c | 68 | @@ -622,7 +622,7 @@ |
89 | @@ -572,7 +572,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, | ||
90 | * multiple. | 69 | * multiple. |
91 | */ | 70 | */ |
92 | #define MOD_EXP_CTIME_ALIGN(x_) \ | 71 | #define MOD_EXP_CTIME_ALIGN(x_) \ |
@@ -95,3 +74,20 @@ Index: openssl-1.0.1e/crypto/bn/bn_exp.c | |||
95 | 74 | ||
96 | /* | 75 | /* |
97 | * This variant of BN_mod_exp_mont() uses fixed windows and the special | 76 | * This variant of BN_mod_exp_mont() uses fixed windows and the special |
77 | diff -ruN a/crypto/bn/bn.h b/crypto/bn/bn.h | ||
78 | --- a/crypto/bn/bn.h 2016-05-03 15:49:00.000000000 +0200 | ||
79 | +++ b/crypto/bn/bn.h 2016-05-04 09:07:52.974863300 +0200 | ||
80 | @@ -174,6 +174,13 @@ | ||
81 | # endif | ||
82 | # endif | ||
83 | |||
84 | +/* Address type. */ | ||
85 | +# ifdef _WIN64 | ||
86 | +# define BN_ADDR unsigned long long | ||
87 | +# else | ||
88 | +# define BN_ADDR unsigned long | ||
89 | +# endif | ||
90 | + | ||
91 | /* | ||
92 | * assuming long is 64bit - this is the DEC Alpha unsigned long long is only | ||
93 | * 64 bits :-(, don't define BN_LLONG for the DEC Alpha | ||