On Thu, Aug 18, 2016 at 9:39 AM, Jakub Jelinek <ja...@redhat.com> wrote: > Hi! > > While looking if something doesn't need to be updated for the > i386-builtin.def addition (I think we are ok, this file doesn't need to be > shipped for plugins, as it is only included in i386.c, the first time > i386.c is built no matter what and next time we'll have it listed in > .deps/i386.Po), I've noticed IMHO incorrect dependency. > i386-builtin-types.inc is included only by i386.c, not by i386-c.c, and > while the second time it will be listed in .deps/i386.Po, I think if > somebody is unlucky enough that i386.o is compiled before i386-c.o, then > i386-builtin-types.inc might not be compiled yet. > > As an experiment, > rm -f i386{,-c}.o .deps/i386{,-c}.Po s-i386-bt i386-builtin-types.inc > make i386.o > fails to compile without this patch. i386-c.o apparently comes before > i386.o in dependencies of cc1, so even with make -j1 it is built before > that. If I add sleep 4s into the s-i386-bt: rules before move-if-change > then even make -j16 build fails after the above rm, so it is all about good > timing. > > Ok for trunk if testing passes?
Uh, yes. This is also OK for backports. Thanks, Uros. > 2016-08-18 Jakub Jelinek <ja...@redhat.com> > > * config/i386/t-i386 (i386-c.o): Don't depend on > i386-builtin-types.inc. > (i386.o): Depend on i386-builtin-types.inc. > > --- gcc/config/i386/t-i386.jj 2016-01-04 14:55:56.000000000 +0100 > +++ gcc/config/i386/t-i386 2016-08-18 09:23:28.523058356 +0200 > @@ -19,10 +19,12 @@ > OPTIONS_H_EXTRA += $(srcdir)/config/i386/stringop.def > TM_H += $(srcdir)/config/i386/x86-tune.def > > -i386-c.o: $(srcdir)/config/i386/i386-c.c i386-builtin-types.inc > +i386-c.o: $(srcdir)/config/i386/i386-c.c > $(COMPILE) $< > $(POSTCOMPILE) > > +i386.o: i386-builtin-types.inc > + > i386-builtin-types.inc: s-i386-bt ; @true > s-i386-bt: $(srcdir)/config/i386/i386-builtin-types.awk \ > $(srcdir)/config/i386/i386-builtin-types.def > > Jakub