Bug 1276069 - Change the local variable used in config/external/nss/Makefile.in to pass down as XCFLAGS to NSS build system
The intent in
bug 1271829 was to make all the XCFLAGS set in
config/external/nss/Makefile.in accumulate instead of replacing each
other. Unfortunately, there is also an AC_SUBST variable named XCFLAGS,
use for other purposes, and we ended up adding on top of that variable.
Using a different local variable allows to still accumulate the values,
while keeping away from the XCFLAGS from autoconf.mk.
--- a/config/external/nss/Makefile.in
+++ b/config/external/nss/Makefile.in
@@ -240,17 +240,17 @@ DEFAULT_GMAKE_FLAGS += \
endif
DEFAULT_GMAKE_FLAGS += FREEBL_NO_DEPEND=0 $(FREEBL_LOWHASH_FLAG)
ifdef MOZ_NO_WLZDEFS
DEFAULT_GMAKE_FLAGS += ZDEFS_FLAG=
endif
ifdef MOZ_CFLAGS_NSS
-XCFLAGS += $(filter-out -W%,$(CFLAGS))
+NSS_XCFLAGS += $(filter-out -W%,$(CFLAGS))
DEFAULT_GMAKE_FLAGS += DARWIN_DYLIB_VERSIONS='-compatibility_version 1 -current_version 1 $(LDFLAGS)'
endif
ifeq (1_1,$(CLANG_CL)_$(MOZ_ASAN))
XLDFLAGS := $(OS_LDFLAGS)
DEFAULT_GMAKE_FLAGS += XLDFLAGS='$(XLDFLAGS)'
endif
DEFAULT_GMAKE_FLAGS += NSS_NO_PKCS11_BYPASS=1
@@ -263,28 +263,28 @@ DEFAULT_GMAKE_FLAGS += MODULE_INCLUDES='
# Work around NSS's MAKE_OBJDIR being racy. See bug #836220
DEFAULT_GMAKE_FLAGS += MAKE_OBJDIR='$$(INSTALL) -D $$(OBJDIR)'
# Work around NSS adding IMPORT_LIBRARY to TARGETS with no rule for
# it, creating race conditions. See bug #836220
DEFAULT_GMAKE_FLAGS += TARGETS='$$(LIBRARY) $$(SHARED_LIBRARY) $$(PROGRAM)'
ifdef MOZ_FOLD_LIBS_FLAGS
-XCFLAGS += $(MOZ_FOLD_LIBS_FLAGS)
+NSS_XCFLAGS += $(MOZ_FOLD_LIBS_FLAGS)
endif
# Pass on the MSVC target arch from the main build system.
# Note this is case- and switch-character sensitive, while
# the MSVC option is not.
ifeq (WINNT,$(OS_TARGET))
-XCFLAGS += $(filter -arch:%,$(CFLAGS))
+NSS_XCFLAGS += $(filter -arch:%,$(CFLAGS))
endif
# Export accumulated XCFLAGS to modify nss defaults.
-DEFAULT_GMAKE_FLAGS += XCFLAGS='$(XCFLAGS)'
+DEFAULT_GMAKE_FLAGS += XCFLAGS='$(NSS_XCFLAGS)'
NSS_SRCDIR = $(topsrcdir)
NSS_DIRS =
ifndef MOZ_FOLD_LIBS
NSS_DIRS += nss/lib
else
ifndef NSS_DISABLE_DBM