From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libnss: fix build failure on arm32 arch not armv7
Date: Wed, 25 Mar 2020 15:31:08 +0100 [thread overview]
Message-ID: <20200325143108.11935-1-giulio.benetti@benettiengineering.com> (raw)
NSS assumes that every arm32 build is an armv7, but this is not, so
let's add a patch to remove -march=armv7 flag.
Fixes:
http://autobuild.buildroot.net/results/464/464044fda2850123339de6c8071374e380636ee0/
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
...w-build-gcm-arm32-neon-on-march-armv.patch | 28 +++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 package/libnss/0002-Bug-1624864-Allow-build-gcm-arm32-neon-on-march-armv.patch
diff --git a/package/libnss/0002-Bug-1624864-Allow-build-gcm-arm32-neon-on-march-armv.patch b/package/libnss/0002-Bug-1624864-Allow-build-gcm-arm32-neon-on-march-armv.patch
new file mode 100644
index 0000000000..f23a067833
--- /dev/null
+++ b/package/libnss/0002-Bug-1624864-Allow-build-gcm-arm32-neon-on-march-armv.patch
@@ -0,0 +1,28 @@
+From 345503215135466a0008ef1b7546b65e5705d0df Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Wed, 25 Mar 2020 15:02:20 +0100
+Subject: [PATCH] Bug 1624864 - Allow build gcm-arm32-neon on -march != armv7
+
+Don't assume every arm32 support armv7 instruction set.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ nss/lib/freebl/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
+index dc502f309..c7eb9c205 100644
+--- a/nss/lib/freebl/Makefile
++++ b/nss/lib/freebl/Makefile
+@@ -781,7 +781,7 @@ ifeq ($(CPU_ARCH),arm)
+ USES_SOFTFLOAT_ABI := $(shell $(CC) -o - -E -dM - $(CFLAGS) < /dev/null | grep __SOFTFP__ > /dev/null && echo 1)
+ $(OBJDIR)/$(PROG_PREFIX)aes-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a -mfpu=crypto-neon-fp-armv8$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
+ ifndef NSS_DISABLE_GCM_ARM32_NEON
+-$(OBJDIR)/$(PROG_PREFIX)gcm-arm32-neon$(OBJ_SUFFIX): CFLAGS += -march=armv7 -mfpu=neon$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
++$(OBJDIR)/$(PROG_PREFIX)gcm-arm32-neon$(OBJ_SUFFIX): CFLAGS += -mfpu=neon$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
+ endif
+ endif
+ ifeq ($(CPU_ARCH),aarch64)
+--
+2.20.1
+
--
2.20.1
next reply other threads:[~2020-03-25 14:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 14:31 Giulio Benetti [this message]
2020-03-25 14:32 ` [Buildroot] [PATCH] package/libnss: fix build failure on arm32 arch not armv7 Giulio Benetti
2020-03-25 14:45 ` Thomas Petazzoni
2020-03-25 15:13 ` Giulio Benetti
2020-04-03 20:11 ` Giulio Benetti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200325143108.11935-1-giulio.benetti@benettiengineering.com \
--to=giulio.benetti@benettiengineering.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox