diff mbox

PATCH: PR bootstrap/51479: Missing dependency on errors.o causes bootstrap failure

Message ID 20111209061733.GA4500@intel.com
State New
Headers show

Commit Message

H.J. Lu Dec. 9, 2011, 6:17 a.m. UTC
gcc/Makefile.in has

gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
              gengtype-state.o version.o errors.o $(LIBDEPS)
        +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
            $(filter-out ($LIBDEPS), $^) $(LIBS)

However, there is no errors.o dependency, which leads to random
parallel build failures.  This patch adds errors.o dependency.  OK
for trunk and release branches?

Thanks.

H.J.
---
2011-12-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/51479
	* Makefile.in (errors.o): New.

Comments

Richard Biener Dec. 9, 2011, 9:40 a.m. UTC | #1
On Fri, Dec 9, 2011 at 7:17 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> gcc/Makefile.in has
>
> gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
>              gengtype-state.o version.o errors.o $(LIBDEPS)
>        +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
>            $(filter-out ($LIBDEPS), $^) $(LIBS)
>
> However, there is no errors.o dependency, which leads to random
> parallel build failures.  This patch adds errors.o dependency.  OK
> for trunk and release branches?

Ok. (the 4.5 and 4.6 branches already have dependencies for error.o,
did they get lost somehow? Consider placing the error.o dependency
at the same old place to ease diffs)

Thanks,
Richard.

> Thanks.
>
> H.J.
> ---
> 2011-12-08  H.J. Lu  <hongjiu.lu@intel.com>
>
>        PR bootstrap/51479
>        * Makefile.in (errors.o): New.
>
> diff --git a/gcc/Makefile.in b/gcc/Makefile.in
> index ae4f4da..83f70fa 100644
> --- a/gcc/Makefile.in
> +++ b/gcc/Makefile.in
> @@ -3947,6 +3947,8 @@ build/genautomata$(build_exeext) : BUILD_LIBS += -lm
>  build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
>               build/gengtype-state.o build/version.o build/errors.o
>
> +errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
> +
>  gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
>               gengtype-state.o version.o errors.o $(LIBDEPS)
>        +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
Joseph Myers Dec. 9, 2011, 11:27 a.m. UTC | #2
On Fri, 9 Dec 2011, Richard Guenther wrote:

> On Fri, Dec 9, 2011 at 7:17 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> > gcc/Makefile.in has
> >
> > gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
> >              gengtype-state.o version.o errors.o $(LIBDEPS)
> >        +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
> >            $(filter-out ($LIBDEPS), $^) $(LIBS)
> >
> > However, there is no errors.o dependency, which leads to random
> > parallel build failures.  This patch adds errors.o dependency.  OK
> > for trunk and release branches?
> 
> Ok. (the 4.5 and 4.6 branches already have dependencies for error.o,
> did they get lost somehow? Consider placing the error.o dependency
> at the same old place to ease diffs)

errors.c ceased to be used for the host with my

2011-05-20  Joseph Myers  <joseph@codesourcery.com>

        * Makefile.in (LIBDEPS): Add libcommon.a.
[...]

patch that made installed host programs consistently use the common 
diagnostics infrastructure.  So that patch removed the dependencies.  It 
appears that

2011-08-04  Romain Geissler  <romain.geissler@gmail.com>

        * gengtype-state.c: Include "bconfig.h" if
[...]

then reintroduced use of errors.o on the host by making gengtype an 
installed program.
Iain Sandoe Dec. 9, 2011, 11:41 a.m. UTC | #3
On 9 Dec 2011, at 11:27, Joseph S. Myers wrote:

> On Fri, 9 Dec 2011, Richard Guenther wrote:
>
>> On Fri, Dec 9, 2011 at 7:17 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>> gcc/Makefile.in has
>>>
>>> gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
>>>              gengtype-state.o version.o errors.o $(LIBDEPS)
>>>        +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
>>>            $(filter-out ($LIBDEPS), $^) $(LIBS)
>>>
>>> However, there is no errors.o dependency, which leads to random
>>> parallel build failures.  This patch adds errors.o dependency.  OK
>>> for trunk and release branches?
>>
>> Ok. (the 4.5 and 4.6 branches already have dependencies for error.o,
>> did they get lost somehow? Consider placing the error.o dependency
>> at the same old place to ease diffs)
>
> errors.c ceased to be used for the host with my
>
> 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
>
>        * Makefile.in (LIBDEPS): Add libcommon.a.
> [...]
>
> patch that made installed host programs consistently use the common
> diagnostics infrastructure.  So that patch removed the  
> dependencies.  It
> appears that
>
> 2011-08-04  Romain Geissler  <romain.geissler@gmail.com>
>
>        * gengtype-state.c: Include "bconfig.h" if
> [...]
>
> then reintroduced use of errors.o on the host by making gengtype an
> installed program.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49992

comment #6 contains a proposed solution to make the interfaces look  
the same so that it is not necessary to do this..

(although that bug was resolved by a different means, I still think it  
would be tidier to make the interfaces match - such that the  
appropriate one can be used for host/build.

Iain
diff mbox

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index ae4f4da..83f70fa 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3947,6 +3947,8 @@  build/genautomata$(build_exeext) : BUILD_LIBS += -lm
 build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
               build/gengtype-state.o build/version.o build/errors.o
 
+errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
+
 gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
               gengtype-state.o version.o errors.o $(LIBDEPS)
 	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \