diff options
Diffstat (limited to 'meta/recipes-support/nss/nss/0001-Bug-1432455-Build-FStar.c-when-not-building-with-int.patch')
-rw-r--r-- | meta/recipes-support/nss/nss/0001-Bug-1432455-Build-FStar.c-when-not-building-with-int.patch | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/meta/recipes-support/nss/nss/0001-Bug-1432455-Build-FStar.c-when-not-building-with-int.patch b/meta/recipes-support/nss/nss/0001-Bug-1432455-Build-FStar.c-when-not-building-with-int.patch new file mode 100644 index 0000000000..f14792306c --- /dev/null +++ b/meta/recipes-support/nss/nss/0001-Bug-1432455-Build-FStar.c-when-not-building-with-int.patch | |||
@@ -0,0 +1,112 @@ | |||
1 | From fe5fd11f3f02d3625b37f8e3c592e5c3e84c1798 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Hommey <mh@glandium.org> | ||
3 | Date: Sun, 27 May 2018 16:20:00 +0200 | ||
4 | Subject: [PATCH] Bug 1432455 - Build FStar.c when not building with int128 | ||
5 | support. r=fkiefer | ||
6 | |||
7 | --HG-- | ||
8 | extra : amend_source : b3f739de2f592ecb9ae1f1ce5ee4fb0e04df22cb | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | https://hg.mozilla.org/projects/nss/rev/2209bddb98b8d105159998b9be91a155aa6bd283 | ||
12 | |||
13 | NSS bug https://bugzilla.mozilla.org/show_bug.cgi?format=default&id=1459739 | ||
14 | |||
15 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
16 | |||
17 | --- | ||
18 | lib/freebl/Makefile | 6 +++++- | ||
19 | lib/freebl/freebl.gyp | 29 +++++++++++++++++------------ | ||
20 | lib/freebl/freebl_base.gypi | 4 +++- | ||
21 | 3 files changed, 25 insertions(+), 14 deletions(-) | ||
22 | |||
23 | Index: nss-3.37.1/nss/lib/freebl/Makefile | ||
24 | =================================================================== | ||
25 | --- nss-3.37.1.orig/nss/lib/freebl/Makefile | ||
26 | +++ nss-3.37.1/nss/lib/freebl/Makefile | ||
27 | @@ -541,12 +541,16 @@ ifeq (,$(filter-out i386 x386 x86 x86_64 | ||
28 | # All intel architectures get the 64 bit version | ||
29 | # With custom uint128 if necessary (faster than generic 32 bit version). | ||
30 | ECL_SRCS += curve25519_64.c | ||
31 | - VERIFIED_SRCS += Hacl_Curve25519.c FStar.c | ||
32 | + VERIFIED_SRCS += Hacl_Curve25519.c | ||
33 | else | ||
34 | # All non intel architectures get the generic 32 bit implementation (slow!) | ||
35 | ECL_SRCS += curve25519_32.c | ||
36 | endif | ||
37 | |||
38 | +ifndef HAVE_INT128_SUPPORT | ||
39 | + VERIFIED_SRCS += FStar.c | ||
40 | +endif | ||
41 | + | ||
42 | ####################################################################### | ||
43 | # (5) Execute "global" rules. (OPTIONAL) # | ||
44 | ####################################################################### | ||
45 | Index: nss-3.37.1/nss/lib/freebl/freebl.gyp | ||
46 | =================================================================== | ||
47 | --- nss-3.37.1.orig/nss/lib/freebl/freebl.gyp | ||
48 | +++ nss-3.37.1/nss/lib/freebl/freebl.gyp | ||
49 | @@ -277,18 +277,10 @@ | ||
50 | 'MP_IS_LITTLE_ENDIAN', | ||
51 | ], | ||
52 | }], | ||
53 | - [ 'OS!="win"', { | ||
54 | - 'conditions': [ | ||
55 | - [ 'target_arch=="x64" or target_arch=="arm64" or target_arch=="aarch64"', { | ||
56 | - 'defines': [ | ||
57 | - # The Makefile does version-tests on GCC, but we're not doing that here. | ||
58 | - 'HAVE_INT128_SUPPORT', | ||
59 | - ], | ||
60 | - }, { | ||
61 | - 'defines': [ | ||
62 | - 'KRML_NOUINT128', | ||
63 | - ], | ||
64 | - }], | ||
65 | + [ 'have_int128_support==1', { | ||
66 | + 'defines': [ | ||
67 | + # The Makefile does version-tests on GCC, but we're not doing that here. | ||
68 | + 'HAVE_INT128_SUPPORT', | ||
69 | ], | ||
70 | }, { | ||
71 | 'defines': [ | ||
72 | @@ -350,5 +342,18 @@ | ||
73 | }, | ||
74 | 'variables': { | ||
75 | 'module': 'nss', | ||
76 | + 'conditions': [ | ||
77 | + [ 'OS!="win"', { | ||
78 | + 'conditions': [ | ||
79 | + [ 'target_arch=="x64" or target_arch=="arm64" or target_arch=="aarch64"', { | ||
80 | + 'have_int128_support%': 1, | ||
81 | + }, { | ||
82 | + 'have_int128_support%': 0, | ||
83 | + }], | ||
84 | + ], | ||
85 | + }, { | ||
86 | + 'have_int128_support%': 0, | ||
87 | + }], | ||
88 | + ], | ||
89 | } | ||
90 | } | ||
91 | Index: nss-3.37.1/nss/lib/freebl/freebl_base.gypi | ||
92 | =================================================================== | ||
93 | --- nss-3.37.1.orig/nss/lib/freebl/freebl_base.gypi | ||
94 | +++ nss-3.37.1/nss/lib/freebl/freebl_base.gypi | ||
95 | @@ -60,7 +60,6 @@ | ||
96 | 'shvfy.c', | ||
97 | 'sysrand.c', | ||
98 | 'tlsprfalg.c', | ||
99 | - 'verified/FStar.c', | ||
100 | ], | ||
101 | 'conditions': [ | ||
102 | [ 'OS=="linux" or OS=="android"', { | ||
103 | @@ -220,6 +219,9 @@ | ||
104 | }], | ||
105 | ], | ||
106 | }], | ||
107 | + [ 'have_int128_support==0', { | ||
108 | + 'sources': [ 'verified/FStar.c' ], | ||
109 | + }], | ||
110 | ], | ||
111 | 'ldflags': [ | ||
112 | '-Wl,-Bsymbolic' | ||