Patchwork gcc-4.8: Parallel build failure due to missing header insn-opinit.h

login
register
mail settings
Submitter Nic Hannekum
Date June 26, 2013, 11:47 a.m.
Message ID <DED1647B-3D46-4862-892D-E357C1EDE9D8@binaryboy.net>
Download mbox | patch
Permalink /patch/254725/
State Superseded
Headers show

Comments

Nic Hannekum - June 26, 2013, 11:47 a.m.
It appears the generated header file, insn-opinit.h is new as of gcc 4.8.
To support parallel builds, gcc/Makefile.in defines a variable containing prerequisite files which guarantees they are built early.
On inspection of gcc/Makefile.in it is obvious that its absence from the 'generated_files' variable is an oversight - the patch simply adds it.

Quoting from gcc/Makefile.in: "
	# Language-independent object files.
	# We put the insn-*.o files first so that a parallel make will build
	# them sooner, because they are large and otherwise tend to be the
	# last objects to finish building.
"
Observations:

	* without patch *
	A parallel build on my 4-core i5 @ 2.5GHz will always fail.
	A parallel build on my 2-core Core Duo @ 1.87GHz will always succeed.
	A non-parallel build (make -j 1) will always succeed on either of the above machines.

	* with patch *
	Both non- and parallel builds always succeed.

Tested on the following gcc versions:
gcc-4.8.0
gcc-4.8.1
gcc-linaro-4.8-2013.04
gcc-linaro-4.8-2013.05
gcc-linaro-4.8-2013.06-1

---
 gcc/Makefile.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 4b04d64..e9ee4a0 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3801,8 +3801,8 @@  s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
 	$(STAMP) s-gtype
 
 generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
-       $(simple_generated_h) specs.h \
-       tree-check.h genrtl.h insn-modes.h tm-preds.h tm-constrs.h \
+       $(simple_generated_h) specs.h tree-check.h insn-opinit.h \
+       genrtl.h insn-modes.h tm-preds.h tm-constrs.h \
        $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gcov-iov.h
 
 # In order for parallel make to really start compiling the expensive