diff --git a/embedding/browser/gtk/tests/Makefile.in b/embedding/browser/gtk/tests/Makefile.in index 022b31f66361..9b1f2b9bb16e 100644 --- a/embedding/browser/gtk/tests/Makefile.in +++ b/embedding/browser/gtk/tests/Makefile.in @@ -67,6 +67,7 @@ EXTRA_LIBS += $(EXTRA_DSO_LIBS) $(STATIC_EXTRA_LIBS) endif +EXTRA_LIBS += $(MOZ_JS_LIBS) EXTRA_LIBS += $(MOZ_COMPONENT_LIBS) include $(topsrcdir)/config/rules.mk diff --git a/js/src/Makefile.in b/js/src/Makefile.in index 03d49193c2f4..7cc1922d1654 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -41,14 +41,18 @@ include $(DEPTH)/config/autoconf.mk MODULE = js LIBRARY_NAME = mozjs -EXPORT_LIBRARY = 1 ifeq ($(OS_ARCH),WINNT) LIBRARY_NAME = js$(MOZ_BITS)$(VERSION_NUMBER) RESFILE = js$(MOZ_BITS)40.res -FORCE_SHARED_LIB = 1 endif +# JavaScript must be built shared, even for static builds, as it is used by +# other modules which are always built shared. Failure to do so results in +# the js code getting copied into xpinstall and jsd as well as mozilla-bin, +# and then the static data cells used for locking no longer work. +FORCE_SHARED_LIB = 1 + ifdef NS_TRACE_MALLOC REQUIRES = xpcom endif diff --git a/xpfe/bootstrap/Makefile.in b/xpfe/bootstrap/Makefile.in index b33898586643..bbffcce669c5 100644 --- a/xpfe/bootstrap/Makefile.in +++ b/xpfe/bootstrap/Makefile.in @@ -98,10 +98,6 @@ EXTRA_DSO_LIBS += jsj endif endif -XP_LIBS += \ - $(MOZ_JS_LIBS) \ - $(NULL) - else include $(topsrcdir)/config/static-config.mk @@ -118,6 +114,7 @@ XP_LIBS += $(STATIC_EXTRA_LIBS) endif XP_LIBS += \ + $(MOZ_JS_LIBS) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ $(NULL) diff --git a/xpinstall/packager/packages-static-unix b/xpinstall/packager/packages-static-unix index a31bfc6afc8d..241767bf1958 100644 --- a/xpinstall/packager/packages-static-unix +++ b/xpinstall/packager/packages-static-unix @@ -32,6 +32,7 @@ bin/defaults/profile/search.rdf bin/defaults/profile/mimeTypes.rdf [xpcom] +bin/libmozjs.so bin/libnspr4.so bin/libplc4.so bin/libplds4.so