libnss: fix build failures
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 11 Dec 2012 03:31:00 +0000 (03:31 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 16 Dec 2012 09:01:19 +0000 (10:01 +0100)
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.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libnss/libnss.mk

index 84fc14996db817f3397913bd94cdb8ad6fd3aefb..96faf370b2c561062e8ac2e4e9263b515091b3dc 100644 (file)
@@ -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