gcc-4.9.inc: fix parallel building failure
authorHongxu Jia <hongxu.jia@windriver.com>
Thu, 24 Jul 2014 01:48:59 +0000 (09:48 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Jul 2014 14:34:00 +0000 (15:34 +0100)
commitd82941da4d6e9b3c55bc0e7f38851c5c28f32cd3
treeecc9e203e7ee6e7e32449aca77f2fb906d869e1f
parent2de20f70feaef8d61b4e1ce6a576ca3412d86477
gcc-4.9.inc: fix parallel building failure

In subdir 'gcc', Most C source files included config.h which was
generated by a rule. But no related prerequisites was added to
the C source compiling rule. There was potential building failure
while makefile enabled parallel.

The C source compiling rule used suffix rule '.c.o', but the suffix
rule doesn't support prerequisites.
https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html

We used the pattern rule '%.o : %.c' to instead, and add the config.h
as its prerequisite

We also moved the '%.o : %.c' rule down to the 'build/%.o :' rule, which
makes '%.o : %.c' rule doesn't override 'build/%.o :'.

[YOCTO #6568]

(From OE-Core rev: 86c2483f0fe05fb763d280ae22d70e54cb4bb0bc)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-4.9.inc
meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch [new file with mode: 0644]