I am afraid adding these to OBJS is incorrect, it will cause other build error.
Please ignore this patch, V3 incoming.

//Hongxu

On 07/25/2014 11:14 AM, Hongxu Jia wrote:
1. Reproduce steps

1) Manually modify gcc/Makefile.in to delay the
generation of config.h:
...
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1622,9 +1622,12 @@ tm.h: cs-tm.h ; @true
  tm_p.h: cs-tm_p.h ; @true
cs-config.h: Makefile
+   @echo "start to generate config.h `date`"
+   sleep 10
     TARGET_CPU_DEFAULT="" \
     HEADERS="$(host_xm_include_list)" DEFINES="$(host_xm_defines)" \
     $(SHELL) $(srcdir)/mkconfig.sh config.h
+   @echo "config.h generated `date`"
cs-bconfig.h: Makefile
     TARGET_CPU_DEFAULT="" \
...

2) configure and compile gcc failure

2. Analysis

While parallel make, the '$(ALL_HOST_OBJS) : | $(generated_files)' rule
doesn't work for these missing objects. And there was potential compile
failure.

[GCC #61899]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899

Signed-off-by: Hongxu Jia <hongxu....@windriver.com>
---
  gcc/Makefile.in | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a726109..e753ebd 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1224,6 +1224,7 @@ OBJS = \
        dwarf2out.o \
        emit-rtl.o \
        et-forest.o \
+       errors.o \
        except.o \
        explow.o \
        expmed.o \
@@ -1233,6 +1234,9 @@ OBJS = \
        fold-const.o \
        function.o \
        fwprop.o \
+       gcc-ar.o \
+       gcc-nm.o \
+       gcc-ranlib.o \
        gcse.o \
        ggc-common.o \
        gimple.o \

Reply via email to