Skip to contentSkip to conversation

libnss: fix build failures

PATCH New Gustavo Zacarias 2 participants 3 messages Dec 11, 2012 – Dec 16, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libnss: fix build failures

Such as
http://autobuild.buildroot.net/results/2ca1d135269a67201e6b4d995ce8fbe94db1ed3f

The mozilla build system passes all of the different ways of CFLAGS (OPTIMIZER, XCFLAGS, OS_CFLAGS) even when building host tools (nsintall).
The best way around this without patching libnss is just building the host tools first without any CFLAGS and then going on with the rest.

---
 package/libnss/libnss.mk |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
package/libnss/libnss.mk +6 -2
index 84fc149..96faf37 100644
@@ -17,7 +17,6 @@ LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \
 		NSPR_LIB_DIR=$(STAGING_DIR)/usr/lib \
 		BUILD_OPT=1 \
 		NS_USE_GCC=1 \
-		OPTIMIZER="$(TARGET_CFLAGS)" \
 		NSS_USE_SYSTEM_SQLITE=1 \
 		NSS_ENABLE_ECC=1 \
 		NATIVE_CC="$(HOSTCC)" \
@@ -34,11 +33,16 @@ endif
 
 
 define LIBNSS_BUILD_CMDS
-	$(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR)/nss build_coreconf build_dbm all \
+	$(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR)/nss build_coreconf \
 			SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \
 			DIST=$(@D)/$(LIBNSS_DISTDIR) \
 			CHECKLOC= \
 			$(LIBNSS_BUILD_VARS)
+	$(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR)/nss build_dbm all \
+			SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \
+			DIST=$(@D)/$(LIBNSS_DISTDIR) \
+			CHECKLOC= \
+			$(LIBNSS_BUILD_VARS) OPTIMIZER="$(TARGET_CFLAGS)"
 endef
 
 define LIBNSS_INSTALL_STAGING_CMDS
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 1/1 libnss: fix build failures

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Such as
Gustavo> http://autobuild.buildroot.net/results/2ca1d135269a67201e6b4d995ce8fbe94db1ed3f

Gustavo> The mozilla build system passes all of the different ways of CFLAGS Gustavo> (OPTIMIZER, XCFLAGS, OS_CFLAGS) even when building host tools Gustavo> (nsintall).
Gustavo> The best way around this without patching libnss is just building the Gustavo> host tools first without any CFLAGS and then going on with the rest.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 libnss: fix build failures

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Such as
Gustavo> http://autobuild.buildroot.net/results/2ca1d135269a67201e6b4d995ce8fbe94db1ed3f

Gustavo> The mozilla build system passes all of the different ways of CFLAGS Gustavo> (OPTIMIZER, XCFLAGS, OS_CFLAGS) even when building host tools Gustavo> (nsintall).
Gustavo> The best way around this without patching libnss is just building the Gustavo> host tools first without any CFLAGS and then going on with the rest.

Hmm, with this applied we still have autobuild failures:

http://autobuild.buildroot.net/results/299a132e7921aef044d121f910175cb9ddc7a04a/build-end.log

Signature · 1 line
Bye, Peter Korsgaard