]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix libatomic multilib parallel build (PR other/67627)
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 6 Jan 2016 14:51:35 +0000 (14:51 +0000)
committerSzabolcs Nagy <nsz@gcc.gnu.org>
Wed, 6 Jan 2016 14:51:35 +0000 (14:51 +0000)
The all-multi target may be built in parallel with the %_.lo
targets which generate make dependencies that are parsed during
the build of all-multi.

This patch forces all-multi to only run after the *_.lo targets
are done.

libatomic:
PR other/67627
* Makefile.am (all-multi): Add dependency.
* Makefile.in: Regenerate.

From-SVN: r232102

libatomic/ChangeLog
libatomic/Makefile.am
libatomic/Makefile.in

index fb42efb31aa8794f4354fe4ae66a7319c11a71fa..f476a6fa8b43ce2710ec8b49e64991d405b416d5 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-06  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       PR other/67627
+       * Makefile.am (all-multi): Add dependency.
+       * Makefile.in: Regenerate.
+
 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index fdc16c0ac9179179bf9a6d72fd06217e6885b324..b35124428509cf71c862ab2b8a64219361cebfc2 100644 (file)
@@ -139,3 +139,10 @@ endif
 
 libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES)
 libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD)
+
+# Override the automake generated all-multi rule to guarantee that all-multi
+# is not run in parallel with the %_.lo rules which generate $(DEPDIR)/*.Ppo
+# makefile fragments to avoid broken *.Ppo getting included into the Makefile
+# when it is reloaded during the build of all-multi.
+all-multi: $(libatomic_la_LIBADD)
+       $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
index b696d554777744276891d76bd820156f0f36f1cd..a083d8702e44b3c3622db87828dac86cb622f5cf 100644 (file)
@@ -496,12 +496,6 @@ clean-libtool:
 
 distclean-libtool:
        -rm -f libtool config.lt
-
-# GNU Make needs to see an explicit $(MAKE) variable in the command it
-# runs to enable its job server during parallel builds.  Hence the
-# comments below.
-all-multi:
-       $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
 install-multi:
        $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
 
@@ -800,6 +794,13 @@ vpath % $(strip $(search_path))
 %_.lo: Makefile
        $(LTCOMPILE) $(M_DEPS) $(M_SIZE) $(M_IFUNC) -c -o $@ $(M_SRC)
 
+# Override the automake generated all-multi rule to guarantee that all-multi
+# is not run in parallel with the %_.lo rules which generate $(DEPDIR)/*.Ppo
+# makefile fragments to avoid broken *.Ppo getting included into the Makefile
+# when it is reloaded during the build of all-multi.
+all-multi: $(libatomic_la_LIBADD)
+       $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT: