summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-11-04 11:25:55 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-11-04 11:25:57 +0100
commitbd235377eb5f4b957949c3a1671ecace68b23ac1 (patch)
tree5e06eb719dd6e7a9933bdca59e22413a36425f2f
parentda73e1bac4d761b80d1b3b65dd4d661a6976ab52 (diff)
downloadptxdist-bd235377eb5f4b957949c3a1671ecace68b23ac1.tar.gz
nss: fix building on ARMv7
The code is not NEON in general, but ARMv8 code. Just don't compile it for ARCH = 'arm'. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/nss-3.47/0004-allow-building-without-NEON.patch32
-rw-r--r--patches/nss-3.47/0004-fix-building-on-ARM.patch40
-rw-r--r--patches/nss-3.47/series4
-rw-r--r--rules/nss.make3
4 files changed, 43 insertions, 36 deletions
diff --git a/patches/nss-3.47/0004-allow-building-without-NEON.patch b/patches/nss-3.47/0004-allow-building-without-NEON.patch
deleted file mode 100644
index 0feb596..0000000
--- a/patches/nss-3.47/0004-allow-building-without-NEON.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Fri, 1 Nov 2019 16:58:55 +0100
-Subject: [PATCH] allow building without NEON
-
-The build-system currently assumes that NEON code can always be built on
-ARM. Make it possible to disable this via the 'make' command-line.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- nss/lib/freebl/Makefile | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
-index 5943fb377894..1401f8154fcc 100644
---- a/nss/lib/freebl/Makefile
-+++ b/nss/lib/freebl/Makefile
-@@ -124,6 +124,7 @@ ifeq ($(CPU_ARCH),aarch64)
- EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
- endif
- ifeq ($(CPU_ARCH),arm)
-+ ifndef NO_NEON
- ifdef CC_IS_CLANG
- DEFINES += -DUSE_HW_AES
- EXTRA_SRCS += aes-armv8.c
-@@ -138,6 +139,7 @@ ifeq ($(CPU_ARCH),arm)
- EXTRA_SRCS += aes-armv8.c
- endif
- endif
-+ endif
- endif
-
- ifeq ($(OS_TARGET),OSF1)
diff --git a/patches/nss-3.47/0004-fix-building-on-ARM.patch b/patches/nss-3.47/0004-fix-building-on-ARM.patch
new file mode 100644
index 0000000..8f1e087
--- /dev/null
+++ b/patches/nss-3.47/0004-fix-building-on-ARM.patch
@@ -0,0 +1,40 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Fri, 1 Nov 2019 16:58:55 +0100
+Subject: [PATCH] fix building on ARM
+
+The build-system currently assumes that 'arm' is ARMv8 as well. This is
+completely broken. Fix it by ensuring, that ARMv8 code is only build for
+aarch64.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ nss/lib/freebl/Makefile | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
+index 5943fb377894..53bf55b57fc8 100644
+--- a/nss/lib/freebl/Makefile
++++ b/nss/lib/freebl/Makefile
+@@ -123,22 +123,6 @@ ifeq ($(CPU_ARCH),aarch64)
+ DEFINES += -DUSE_HW_AES
+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
+ endif
+-ifeq ($(CPU_ARCH),arm)
+- ifdef CC_IS_CLANG
+- DEFINES += -DUSE_HW_AES
+- EXTRA_SRCS += aes-armv8.c
+- else ifeq (1,$(CC_IS_GCC))
+- # Old compiler doesn't support ARM AES.
+- ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION))))
+- DEFINES += -DUSE_HW_AES
+- EXTRA_SRCS += aes-armv8.c
+- endif
+- ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION))))
+- DEFINES += -DUSE_HW_AES
+- EXTRA_SRCS += aes-armv8.c
+- endif
+- endif
+-endif
+
+ ifeq ($(OS_TARGET),OSF1)
+ DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
diff --git a/patches/nss-3.47/series b/patches/nss-3.47/series
index 81523e2..44a6b1e 100644
--- a/patches/nss-3.47/series
+++ b/patches/nss-3.47/series
@@ -3,5 +3,5 @@
0001-nss-fix-nsinstall-build.patch
0002-add-nss.pc.in.patch
0003-HACK-don-t-build-the-commands.patch
-0004-allow-building-without-NEON.patch
-# 519407b92c5bc296cbc80edaabf6253f - git-ptx-patches magic
+0004-fix-building-on-ARM.patch
+# a74f505fdd783f123199d2e6f1a43c32 - git-ptx-patches magic
diff --git a/rules/nss.make b/rules/nss.make
index 0e52ab9..373a9c0 100644
--- a/rules/nss.make
+++ b/rules/nss.make
@@ -55,8 +55,7 @@ NSS_MAKE_PAR := NO
NSS_MAKE_OPT := \
OS_ARCH=Linux \
OS_RELEASE=$(PTXCONF_KERNEL_VERSION) \
- OS_TEST=$(NSS_ARCH) \
- NO_NEON=$(call ptx/ifdef, PTXCONF_ARCH_ARM_NEON,,1)
+ OS_TEST=$(NSS_ARCH)
# ----------------------------------------------------------------------------
# Install