summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-01-26 11:27:39 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commitd52913fe1991b41c5d5f68dd591a7a77cd6b4728 (patch)
tree21cc9753f5f72910b414bac22ab6616ce7f28188 /meta/recipes-support
parent403b5e4b530f25e93b6a1fa485fcd07c344788f5 (diff)
downloadpoky-d52913fe1991b41c5d5f68dd591a7a77cd6b4728.tar.gz
nss: Pass NSS_USE_ARM_HW_CRYPTO as define in CFLAGS
Use NSS_USE_ARM_HW_CRYPTO to detect USE_ARM_GCM, since there are dependent, without this we control the crypto code function inclusion in build but do not control the call sites, which can result in undefined symbols e.g. Linux_SINGLE_SHLIB/gcm.o: in function `gcmHash_InitContext': /usr/src/debug/nss/3.49.1-r0/nss-3.49.1/nss/lib/freebl/gcm.c:112: undefined reference to `gcm_HashInit_hw' (From OE-Core rev: 4f8f2fd72fee6cf5aedbb679b2c29b88f98a5e11) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch25
1 files changed, 21 insertions, 4 deletions
diff --git a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch b/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
index fe29d19882..803c06b218 100644
--- a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
+++ b/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
@@ -12,20 +12,19 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12 nss/lib/freebl/Makefile | 3 +++ 12 nss/lib/freebl/Makefile | 3 +++
13 1 file changed, 3 insertions(+) 13 1 file changed, 3 insertions(+)
14 14
15diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
16index 06506f0..a8b015d 100644
17--- a/nss/lib/freebl/Makefile 15--- a/nss/lib/freebl/Makefile
18+++ b/nss/lib/freebl/Makefile 16+++ b/nss/lib/freebl/Makefile
19@@ -125,6 +125,8 @@ else 17@@ -125,6 +125,9 @@ else
20 DEFINES += -DNSS_X86 18 DEFINES += -DNSS_X86
21 endif 19 endif
22 endif 20 endif
23+ 21+
24+ifdef NSS_USE_ARM_HW_CRYPTO 22+ifdef NSS_USE_ARM_HW_CRYPTO
23+ DEFINES += -DNSS_USE_ARM_HW_CRYPTO
25 ifeq ($(CPU_ARCH),aarch64) 24 ifeq ($(CPU_ARCH),aarch64)
26 DEFINES += -DUSE_HW_AES 25 DEFINES += -DUSE_HW_AES
27 EXTRA_SRCS += aes-armv8.c gcm-aarch64.c 26 EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
28@@ -145,6 +147,7 @@ ifeq ($(CPU_ARCH),arm) 27@@ -146,6 +149,7 @@ ifeq ($(CPU_ARCH),arm)
29 endif 28 endif
30 endif 29 endif
31 endif 30 endif
@@ -33,3 +32,21 @@ index 06506f0..a8b015d 100644
33 32
34 ifeq ($(OS_TARGET),OSF1) 33 ifeq ($(OS_TARGET),OSF1)
35 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD 34 DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
35--- a/nss/lib/freebl/gcm.c
36+++ b/nss/lib/freebl/gcm.c
37@@ -17,6 +17,7 @@
38
39 #include <limits.h>
40
41+#ifdef NSS_USE_ARM_HW_CRYPTO
42 /* old gcc doesn't support some poly64x2_t intrinsic */
43 #if defined(__aarch64__) && defined(IS_LITTLE_ENDIAN) && \
44 (defined(__clang__) || defined(__GNUC__) && __GNUC__ > 6)
45@@ -28,6 +29,7 @@
46 * that compiler uses -mfpu=neon only. */
47 #define USE_ARM_GCM
48 #endif
49+#endif
50
51 /* Forward declarations */
52 SECStatus gcm_HashInit_hw(gcmHashContext *ghash);