From f542843cc0e003ac5a6f576dfa5dabf62a3203f1 Mon Sep 17 00:00:00 2001 From: Ginn Chen Date: Thu, 6 May 2010 13:49:27 +0800 Subject: [PATCH] Bug 539188 Fix jemalloc linkage for Solaris, revert Bug 534848 r=ted.mielczarek --- config/rules.mk | 14 ++++---------- configure.in | 1 - js/src/Makefile.in | 6 ------ js/src/config/rules.mk | 14 ++++---------- xpcom/base/nsMemoryReporterManager.cpp | 2 +- 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/config/rules.mk b/config/rules.mk index bb5e4d288eff..6da6ac2683d7 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1017,9 +1017,9 @@ ifdef MOZ_PROFILE_GENERATE endif else # !WINNT || GNU_CC ifeq ($(CPP_PROG_LINK),1) - $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE) + $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE) else # ! CPP_PROG_LINK - $(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) + $(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) endif # CPP_PROG_LINK endif # WINNT && !GNU_CC endif # WINCE @@ -1088,9 +1088,9 @@ ifdef MSMANIFEST_TOOL endif # MSVC with manifest tool else ifeq ($(CPP_PROG_LINK),1) - $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) + $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) else - $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) + $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) endif # CPP_PROG_LINK endif # WINNT && !GNU_CC endif # WINCE @@ -1364,12 +1364,6 @@ endif # COMPILER_DEPEND endif # MOZ_AUTO_DEPS -ifdef MOZ_MEMORY -ifeq ($(OS_ARCH),SunOS) -SOLARIS_JEMALLOC_LDFLAGS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib) -endif -endif - # Rules for building native targets must come first because of the host_ prefix host_%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS) $(REPORT_BUILD) diff --git a/configure.in b/configure.in index d2a1d8d83385..c43ce7c19dab 100644 --- a/configure.in +++ b/configure.in @@ -2704,7 +2704,6 @@ alpha*-*-osf*) # $ORIGIN/.. is for shared libraries under components/ to locate shared # libraries one level up (e.g. libnspr4.so) LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..'" - MOZ_MEMORY=1 if test "$SOLARIS_SUNPRO_CC"; then LIBS="-lCrun -lCstd $LIBS" NS_USE_NATIVE=1 diff --git a/js/src/Makefile.in b/js/src/Makefile.in index c9acd1078f67..90258f873ac8 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -329,12 +329,6 @@ include $(topsrcdir)/config/config.mk EXTRA_DSO_LDOPTS += $(NSPR_LIBS) -ifdef MOZ_MEMORY -ifeq ($(OS_ARCH),SunOS) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib) -endif -endif - ifndef BUILD_OPT MOCHAFILE = 1 endif diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index bb5e4d288eff..6da6ac2683d7 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -1017,9 +1017,9 @@ ifdef MOZ_PROFILE_GENERATE endif else # !WINNT || GNU_CC ifeq ($(CPP_PROG_LINK),1) - $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE) + $(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE) else # ! CPP_PROG_LINK - $(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) + $(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) endif # CPP_PROG_LINK endif # WINNT && !GNU_CC endif # WINCE @@ -1088,9 +1088,9 @@ ifdef MSMANIFEST_TOOL endif # MSVC with manifest tool else ifeq ($(CPP_PROG_LINK),1) - $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) + $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) else - $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) + $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(BIN_FLAGS) endif # CPP_PROG_LINK endif # WINNT && !GNU_CC endif # WINCE @@ -1364,12 +1364,6 @@ endif # COMPILER_DEPEND endif # MOZ_AUTO_DEPS -ifdef MOZ_MEMORY -ifeq ($(OS_ARCH),SunOS) -SOLARIS_JEMALLOC_LDFLAGS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib) -endif -endif - # Rules for building native targets must come first because of the host_ prefix host_%.$(OBJ_SUFFIX): %.c $(GLOBAL_DEPS) $(REPORT_BUILD) diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index df6ac8b61a21..09526bd70122 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -52,7 +52,7 @@ * get to jemalloc_stats(). So just do this on Windows until * that's fixed. */ -#if defined(MOZ_MEMORY) && (defined(XP_WIN) || defined(SOLARIS)) +#if defined(MOZ_MEMORY) && defined(XP_WIN) #define HAVE_JEMALLOC_STATS 1 #else #undef HAVE_JEMALLOC_STATS