Bug 557413 - Fix race condition building static and shared libraries. r=ted
authorDan Witte <dwitte@mozilla.com>
Thu, 08 Apr 2010 16:03:06 -0700
changeset 40613 4c1ed264c69d00ff305f44b11dcca17534472ae4
parent 40612 94a52b6b6d4eb03efc2465aa36d2c147cbbc91d6
child 40614 0b85f374e62367affbcfae64490ea0bbd1d048c9
push id12703
push userdwitte@mozilla.com
push dateThu, 08 Apr 2010 23:03:27 +0000
treeherdermozilla-central@4c1ed264c69d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs557413
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 557413 - Fix race condition building static and shared libraries. r=ted
config/rules.mk
js/src/Makefile.in
js/src/config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1234,17 +1234,17 @@ endif
 endif
 endif
 
 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
 # so instead of deleting .o files after repacking them into a dylib, we make
 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
 # so no need to conditionalize on OS version or debugging format.
 
-$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
+$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(LIBRARY) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
 ifndef INCREMENTAL_LINKER
 	rm -f $@
 endif
 ifeq ($(OS_ARCH),OpenVMS)
 	@if test ! -f $(VMS_SYMVEC_FILE); then \
 	  if test -f $(VMS_SYMVEC_FILE_MODULE); then \
 	    echo Creating specific component options file $(VMS_SYMVEC_FILE); \
 	    cp $(VMS_SYMVEC_FILE_MODULE) $(VMS_SYMVEC_FILE); \
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -290,17 +290,17 @@ LOCAL_INCLUDES = \
     $(NULL)
 
 ifeq ($(OS_ARCH),OS2)
 # libffi builds an aout lib on OS/2; convert it to an OMF lib.
 ctypes/libffi/.libs/libffi.$(LIB_SUFFIX): ctypes/libffi/.libs/libffi.a
 	emxomf $<
 endif
 
-SHARED_LIBRARY_LIBS = \
+SHARED_LIBRARY_LIBS += \
     ctypes/libffi/.libs/libffi.$(LIB_SUFFIX) \
     $(NULL)
 endif # JS_HAS_CTYPES
 
 ifdef HAVE_DTRACE
 INSTALLED_HEADERS += \
 		jsdtracef.h \
 		$(CURDIR)/javascript-trace.h \
@@ -366,22 +366,22 @@ config/nsinstall$(HOST_BIN_SUFFIX): $(sr
 	$(MAKE) -C config/ nsinstall$(HOST_BIN_SUFFIX)
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef JS_HAS_CTYPES
 # Build libffi proper as part of the 'exports' target, so things get built
-# in the right order. Specify -j1 to make sure we don't get a parallel build.
+# in the right order.
 export::
-	$(MAKE) -j1 -C ctypes/libffi
+		$(call SUBMAKE,,ctypes/libffi)
 
 clean::
-	$(MAKE) -j1 -C ctypes/libffi clean
+		$(call SUBMAKE,clean,ctypes/libffi)
 endif
 
 ifdef MOZ_SYNC_BUILD_FILES
 # Because the SpiderMonkey can be distributed and built independently
 # of the Mozilla source tree, it contains its own copies of many of
 # the files used by the top-level Mozilla build process, from the
 # 'config' and 'build' subtrees.
 #
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1234,17 +1234,17 @@ endif
 endif
 endif
 
 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
 # so instead of deleting .o files after repacking them into a dylib, we make
 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
 # so no need to conditionalize on OS version or debugging format.
 
-$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
+$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(LIBRARY) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) $(GLOBAL_DEPS)
 ifndef INCREMENTAL_LINKER
 	rm -f $@
 endif
 ifeq ($(OS_ARCH),OpenVMS)
 	@if test ! -f $(VMS_SYMVEC_FILE); then \
 	  if test -f $(VMS_SYMVEC_FILE_MODULE); then \
 	    echo Creating specific component options file $(VMS_SYMVEC_FILE); \
 	    cp $(VMS_SYMVEC_FILE_MODULE) $(VMS_SYMVEC_FILE); \