Fixup for bug 736564 - Ship libmemory.a in the SDK instead of libjemalloc.a. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 04 May 2012 09:46:27 +0200
changeset 97198 9138b968b9e85db92224ac4548591baed917096e
parent 97197 683c20f1d5bd98be7ba96ca9129ca557510ddef2
child 97199 b162f27251fbd43e91c137bbce3529b09c4821f4
push idunknown
push userunknown
push dateunknown
reviewersted
bugs736564
milestone15.0a1
Fixup for bug 736564 - Ship libmemory.a in the SDK instead of libjemalloc.a. r=ted
configure.in
memory/build/Makefile.in
memory/jemalloc/Makefile.in
mozglue/build/Makefile.in
--- a/configure.in
+++ b/configure.in
@@ -7152,17 +7152,17 @@ elif test "${OS_TARGET}" = "WINNT" -o "$
     MOZ_GLUE_LDFLAGS='-L$(LIBXUL_DIST)/lib $(call EXPAND_LIBNAME,mozglue)'
   fi
 else
   dnl On other Unix systems, we only want to link executables against mozglue
   MOZ_GLUE_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib)'
   dnl On other Unix systems, where mozglue is a static library, jemalloc is
   dnl separated for the SDK, so we need to add it here.
   if test "$MOZ_MEMORY" = 1; then
-    MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(call EXPAND_LIBNAME_PATH,jemalloc,$(LIBXUL_DIST)/lib)'
+    MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(call EXPAND_LIBNAME_PATH,memory,$(LIBXUL_DIST)/lib)'
   fi
   MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(MKSHLIB_UNFORCE_ALL)'
   if test -n "$GNU_CC"; then
     dnl And we need mozglue symbols to be exported.
     MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS -rdynamic"
   fi
   if test "$MOZ_LINKER" = 1; then
     MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS $ZLIB_LIBS"
--- a/memory/build/Makefile.in
+++ b/memory/build/Makefile.in
@@ -8,12 +8,18 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = memory
 LIBRARY_NAME = memory
 FORCE_STATIC_LIB = 1
 STLFLAGS =
+ifdef MOZ_GLUE_PROGRAM_LDFLAGS
+SDK_LIBRARY = $(REAL_LIBRARY)
+DIST_INSTALL = 1
+endif
 
 CSRCS = extraMallocFuncs.c
 
+SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
+
 include $(topsrcdir)/config/rules.mk
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -48,20 +48,16 @@ MODULE		= jemalloc
 # jemalloc.c properly uses 'static', so don't burden it with manually exposing
 # symbols.
 VISIBILITY_FLAGS=
 
 CSRCS = jemalloc.c
 EXPORTS = jemalloc.h jemalloc_types.h
 LIBRARY_NAME = jemalloc
 FORCE_STATIC_LIB= 1
-ifdef MOZ_GLUE_PROGRAM_LDFLAGS
-SDK_LIBRARY = $(REAL_LIBRARY)
-DIST_INSTALL = 1
-endif
 
 ifeq ($(OS_ARCH),SunOS)
 ifndef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -xO5
 endif
 endif
 
 ifeq (Linux,$(OS_TARGET))
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -53,17 +53,16 @@ ifneq (,$(filter WINNT Darwin Android,$(
 FORCE_SHARED_LIB = 1
 else
 FORCE_STATIC_LIB = 1
 endif
 
 # Keep jemalloc separated when mozglue is statically linked
 ifeq (1_1,$(MOZ_MEMORY)_$(FORCE_SHARED_LIB))
 SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
-SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
 else
 # Temporary, until bug 662814 lands
 VISIBILITY_FLAGS =
 CPPSRCS = dummy.cpp
 
 ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
 SDK_LIBRARY = $(IMPORT_LIBRARY)
 else