diff --git a/mozilla/browser/app/Makefile.in b/mozilla/browser/app/Makefile.in index 49308aad5fd..33ba1ac9b79 100644 --- a/mozilla/browser/app/Makefile.in +++ b/mozilla/browser/app/Makefile.in @@ -76,9 +76,6 @@ ifdef MOZ_MEMORY ifneq ($(OS_ARCH),WINNT) LIBS += -ljemalloc endif -ifeq ($(OS_ARCH),SunOS) -SOLARIS_JEMALLOC_LDFLAGS = -L$(LIBXUL_DIST)/bin -lxul -endif endif ifdef LIBXUL_SDK diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk index bc10c19d659..05b5eb25225 100644 --- a/mozilla/config/rules.mk +++ b/mozilla/config/rules.mk @@ -1226,6 +1226,12 @@ 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 Makefile Makefile.in $(REPORT_BUILD) diff --git a/mozilla/js/src/Makefile.in b/mozilla/js/src/Makefile.in index 9a6b546f559..8f9230a9034 100644 --- a/mozilla/js/src/Makefile.in +++ b/mozilla/js/src/Makefile.in @@ -206,6 +206,12 @@ 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 + # When using gcc the assembly is inlined in the C-file (see jslock.c) ifeq ($(OS_ARCH),SunOS) ifneq (86,$(findstring 86,$(OS_TEST))) diff --git a/mozilla/xpcom/typelib/xpidl/Makefile.in b/mozilla/xpcom/typelib/xpidl/Makefile.in index f93b256f72b..865fe2bd23d 100644 --- a/mozilla/xpcom/typelib/xpidl/Makefile.in +++ b/mozilla/xpcom/typelib/xpidl/Makefile.in @@ -134,6 +134,11 @@ include $(topsrcdir)/config/rules.mk CFLAGS += $(LIBIDL_CFLAGS) +# Do not link to jemalloc +ifeq ($(OS_ARCH),SunOS) +SOLARIS_JEMALLOC_LDFLAGS = +endif + # Compile directly against the static lib, so we can use xpidl during the build # without the shared library path being set. ifneq (,$(filter WINNT WINCE OS2,$(OS_ARCH))) diff --git a/mozilla/xpcom/typelib/xpt/tools/Makefile.in b/mozilla/xpcom/typelib/xpt/tools/Makefile.in index c027c41cf0c..c24f0d80f6c 100644 --- a/mozilla/xpcom/typelib/xpt/tools/Makefile.in +++ b/mozilla/xpcom/typelib/xpt/tools/Makefile.in @@ -62,6 +62,11 @@ LIBS = $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) include $(topsrcdir)/config/rules.mk +# Do not link to jemalloc +ifeq ($(OS_ARCH),SunOS) +SOLARIS_JEMALLOC_LDFLAGS = +endif + # Compile directly against the static lib, so we can use the tools # during the build without the shared library path being set. ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))