bug 415928 - fix packaging of CRT with jemalloc - make nspr/nss play along. r=bsmedberg
authorted.mielczarek@gmail.com
Mon, 25 Feb 2008 12:50:35 -0800
changeset 12206 258dacaa876b8e79d124760134d4231b78e722c7
parent 12205 d3a1c9e38e8176eac6cdf241044db9c5dfe5f474
child 12207 1127e6ab059bac9f8e9503c386e7d185d222ed9e
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs415928
milestone1.9b4pre
bug 415928 - fix packaging of CRT with jemalloc - make nspr/nss play along. r=bsmedberg
config/autoconf.mk.in
configure.in
security/manager/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -568,16 +568,18 @@ WIN32_CRT_SRC_DIR = @WIN32_CRT_SRC_DIR@
 WIN32_CUSTOM_CRT_DIR = @WIN32_CUSTOM_CRT_DIR@
 # These are for custom CRT building
 ifdef MOZ_MEMORY
 ifneq (,$(WIN32_CRT_SRC_DIR)$(WIN32_CUSTOM_CRT_DIR))
 export LIB = @MOZ_LIB@
 export PATH = @MOZ_PATH@
 endif
 endif
+DLLFLAGS = @DLLFLAGS@
+
 # python options.
 MOZ_PYTHON_EXTENSIONS = @MOZ_PYTHON_EXTENSIONS@
 MOZ_PYTHON = @MOZ_PYTHON@
 MOZ_PYTHON_PREFIX = @MOZ_PYTHON_PREFIX@
 MOZ_PYTHON_INCLUDES = @MOZ_PYTHON_INCLUDES@
 MOZ_PYTHON_LIBS = @MOZ_PYTHON_LIBS@
 MOZ_PYTHON_DEBUG_SUFFIX = @MOZ_PYTHON_DEBUG_SUFFIX@
 MOZ_PYTHON_DLL_SUFFIX = @MOZ_PYTHON_DLL_SUFFIX@
--- a/configure.in
+++ b/configure.in
@@ -6116,27 +6116,32 @@ if test "$MOZ_MEMORY"; then
     MOZ_LIB="$_WIN_CRT_PATH;$LIB"
     dnl Needs to be in PATH too, since our tools will wind up linked against it.
     dnl This needs to be unix style.
     MOZ_PATH="$PATH:$_WIN_UNIX_CRT_PATH"
     dnl Statically link the C++ stdlib.  We only use this for Breakpad anyway.
     AC_DEFINE(_STATIC_CPPLIB)
     dnl Don't generate a manifest, since we're linking to a custom CRT.
     LDFLAGS="$LDFLAGS -MANIFEST:NO"
+    dnl Also pass this to NSPR/NSS
+    DLLFLAGS="$DLLFLAGS -MANIFEST:NO"
+    export DLLFLAGS
     ;;
   *)
     AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
     ;;
   esac
 fi
 AC_SUBST(MOZ_MEMORY)
 AC_SUBST(WIN32_CRT_SRC_DIR)
 AC_SUBST(WIN32_CUSTOM_CRT_DIR)
 AC_SUBST(MOZ_LIB)
 AC_SUBST(MOZ_PATH)
+dnl Need to set this for make because NSS doesn't have configure
+AC_SUBST(DLLFLAGS)
 
 dnl ========================================================
 dnl = Use malloc wrapper lib
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(wrap-malloc,
 [  --enable-wrap-malloc    Wrap malloc calls (gnu linker only)],
     _WRAP_MALLOC=1,
     _WRAP_MALLOC= )
--- a/security/manager/Makefile.in
+++ b/security/manager/Makefile.in
@@ -138,16 +138,19 @@ else
 NSPR_INCLUDE_DIR = $(ABS_DIST)/include/nspr
 endif
 NSPR_LIB_DIR = $(firstword $(filter -L%,$(NSPR_LIBS)))
 ifneq (,$(strip $(NSPR_LIB_DIR)))
 NSPR_LIB_DIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIB_DIR)))
 else
 NSPR_LIB_DIR = $(ABS_DIST)/lib
 endif
+# Can't pass this in DEFAULT_GMAKE_FLAGS because that overrides
+# definitions in NSS, so just export it into the sub-make's environment.
+export DLLFLAGS
 # NSS makefiles are not safe for parallel execution.
 DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1
 DEFAULT_GMAKE_FLAGS += CC="$(CC)"
 DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST)
 DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
 DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=$(NSPR_INCLUDE_DIR)
 DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
 DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1