[Buildroot] [git commit] package/libnss: fix build failure on RHEL 7

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Dec 23 22:43:04 UTC 2019


commit: https://git.buildroot.net/buildroot/commit/?id=fe4b47a12181b89eecb9a8e324f1ad053147f948
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

-DLINUX flag was passed to OS_CFLAGS instead of DEFINES, but OS_CFLAGS
is only used when cross-compiling, not when native building.

Add patch to fix build failure on RHEL 7 host by substituting OS_CFLAGS
with DEFINES.

Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 ...8-Fix-nsinstall.c-build-failure-on-RHEL-7.patch | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/package/libnss/0005-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch b/package/libnss/0005-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch
new file mode 100644
index 0000000000..631d97d11f
--- /dev/null
+++ b/package/libnss/0005-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch
@@ -0,0 +1,29 @@
+From 1ba8516045bc8a13fd72e1a85206a04b29d96758 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti at benettiengineering.com>
+Date: Thu, 12 Dec 2019 12:57:29 +0100
+Subject: [PATCH] Bug 1603398 - Fix nsinstall.c build failure on RHEL 7
+
+In Linux.mk -DLINUX and -Dlinux must be passed to DEFINES, not
+OS_CFLAGS.
+
+Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
+---
+ nss/coreconf/Linux.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
+index d07f8a3c5..4b45a6054 100644
+--- a/nss/coreconf/Linux.mk
++++ b/nss/coreconf/Linux.mk
+@@ -132,7 +132,7 @@ endif
+ 
+ OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR
+ ifeq ($(KERNEL),Linux)
+-	OS_CFLAGS	+= -DLINUX -Dlinux
++	DEFINES		+= -DLINUX -Dlinux
+ endif
+ OS_LIBS			= $(OS_PTHREAD) -ldl -lc
+ 
+-- 
+2.20.1
+


More information about the buildroot mailing list