summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.9
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-07-24 09:48:59 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 15:34:00 +0100
commitf6507d311ae46a61b930939528149ba58a6b6a9d (patch)
treeaeea52bd43b09092c7dd9e2f472ef09c61c87045 /meta/recipes-devtools/gcc/gcc-4.9
parent30ef7b2c054c2712865e6593b948c4d89f9b6309 (diff)
downloadpoky-f6507d311ae46a61b930939528149ba58a6b6a9d.tar.gz
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>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.9')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch b/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
new file mode 100644
index 0000000000..213820a104
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
@@ -0,0 +1,56 @@
1gcc/Makefile.in: fix parallel building failure
2
3Most C source files included config.h which was generated by a rule.
4But no related prerequisites was added to the C source compiling rule.
5There was potential building failure while makefile enabled parallel.
6
7The C source compiling rule used suffix rule '.c.o', but the suffix
8rule doesn't support prerequisites.
9https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html
10
11We used the pattern rule '%.o : %.c' to instead, and add the config.h
12as its prerequisite
13
14We also moved the '%.o : %.c' rule down to the 'build/%.o :' rule, which
15makes '%.o : %.c' rule doesn't override 'build/%.o :'.
16
17Upstream-Status: Pending
18
19Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
20---
21 gcc/Makefile.in | 12 ++++++++----
22 1 file changed, 8 insertions(+), 4 deletions(-)
23
24diff --git a/gcc/Makefile.in b/gcc/Makefile.in
25index 6475cba..04889fe 100644
26--- a/gcc/Makefile.in
27+++ b/gcc/Makefile.in
28@@ -1054,10 +1054,6 @@ COMPILE = source='$<' object='$@' libtool=no \
29 POSTCOMPILE =
30 endif
31
32-.cc.o .c.o:
33- $(COMPILE) $<
34- $(POSTCOMPILE)
35-
36 #
37 # Support for additional languages (other than C).
38 # C can be supported this way too (leave for later).
39@@ -2342,6 +2338,14 @@ build/%.o : # dependencies provided by explicit rule later
40 $(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
41 -o $@ $<
42
43+%.o: %.c $(CONFIG_H)
44+ $(COMPILE) $<
45+ $(POSTCOMPILE)
46+
47+%.o: %.cc $(CONFIG_H)
48+ $(COMPILE) $<
49+ $(POSTCOMPILE)
50+
51 ## build/version.o is compiled by the $(COMPILER_FOR_BUILD) but needs
52 ## several C macro definitions, just like version.o
53 build/version.o: version.c version.h \
54--
551.8.1.2
56