diff options
| author | Christopher Larson <chris_larson@mentor.com> | 2016-12-13 20:08:03 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-09 13:39:13 +0000 |
| commit | 0e74dff7e91a024f105ccb3fb6bd4f0393b94245 (patch) | |
| tree | dabca0dc093a4fd15a1714c844671e3df36d33cd | |
| parent | 602b1858113e6807a7e40820d377ee5a529798af (diff) | |
| download | poky-0e74dff7e91a024f105ccb3fb6bd4f0393b94245.tar.gz | |
nss: fix for x32
This was casting to a pointer, and the pointer sizes are 32-bit on X32, not
64-bit. Adjust as appropriate.
(From OE-Core rev: d9dca61ed26af166df913f34bdce3f2830682b33)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch | 31 | ||||
| -rw-r--r-- | meta/recipes-support/nss/nss_3.27.1.bb | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch b/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch new file mode 100644 index 0000000000..f7f2c217da --- /dev/null +++ b/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From c8eadfcdfbc1d5a4799e9a264b0f859cb5954c05 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Christopher Larson <chris_larson@mentor.com> | ||
| 3 | Date: Tue, 13 Dec 2016 11:40:47 -0700 | ||
| 4 | Subject: [PATCH 7/7] Fix compilation for X32 | ||
| 5 | |||
| 6 | X32 uses 32-bit pointers, not 64-bit. | ||
| 7 | |||
| 8 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
| 9 | --- | ||
| 10 | nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | 4 ++++ | ||
| 11 | 1 file changed, 4 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | ||
| 14 | index 2a3301e..d4ade41 100644 | ||
| 15 | --- a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | ||
| 16 | +++ b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | ||
| 17 | @@ -87,7 +87,11 @@ static poly1305_state_internal INLINE | ||
| 18 | * | ||
| 19 | poly1305_aligned_state(poly1305_state *state) | ||
| 20 | { | ||
| 21 | +#ifdef __ILP32__ | ||
| 22 | + return (poly1305_state_internal *)(((uint32_t)state + 63) & ~63); | ||
| 23 | +#else | ||
| 24 | return (poly1305_state_internal *)(((uint64_t)state + 63) & ~63); | ||
| 25 | +#endif | ||
| 26 | } | ||
| 27 | |||
| 28 | /* copy 0-63 bytes */ | ||
| 29 | -- | ||
| 30 | 2.8.0 | ||
| 31 | |||
diff --git a/meta/recipes-support/nss/nss_3.27.1.bb b/meta/recipes-support/nss/nss_3.27.1.bb index a69672b3d8..2a4f4d6d4b 100644 --- a/meta/recipes-support/nss/nss_3.27.1.bb +++ b/meta/recipes-support/nss/nss_3.27.1.bb | |||
| @@ -22,6 +22,7 @@ SRC_URI = "\ | |||
| 22 | file://nss-fix-nsinstall-build.patch \ | 22 | file://nss-fix-nsinstall-build.patch \ |
| 23 | file://disable-Wvarargs-with-clang.patch \ | 23 | file://disable-Wvarargs-with-clang.patch \ |
| 24 | file://pqg.c-ULL_addend.patch \ | 24 | file://pqg.c-ULL_addend.patch \ |
| 25 | file://Fix-compilation-for-X32.patch \ | ||
| 25 | file://nss.pc.in \ | 26 | file://nss.pc.in \ |
| 26 | file://signlibs.sh \ | 27 | file://signlibs.sh \ |
| 27 | " | 28 | " |
