Message ID | 4CD97CF7.4080701@gnu.org |
---|---|
State | New |
Headers | show |
Paolo's earlier patch #undef'ing _LARGE_FILES works and allows me to bootstrap; still running testsuite. I agree about the potential problems, although gengtype is fairly independent. I am worried about defining _LARGE_FILES in CFLAGS causing other problems because that will cause many other files that do not use auto-hosts.h to be compiled with _LARGE_FILES support with unknown affects. Inserting bconfig.h first seems the most localized approach. Thanks, David On Tue, Nov 9, 2010 at 11:55 AM, Paolo Bonzini <bonzini@gnu.org> wrote: > On 11/09/2010 05:46 PM, Ian Lance Taylor wrote: >> >> David Edelsohn<dje.gcc@gmail.com> writes: >> >>> With Paolo's patch, my bootstrap has progressed into stage 2. >>> Hopefully the Flex-generated file is the only case where header files >>> are included in the wrong order. Paolo's patch definitely is a step >>> in the right direction. >> >> Paolo's patch makes me a little bit uncomfortable because it means that >> gengtype-lex.l is compiled with a different ABI than the rest of the >> compiler. Of course it's a very simple file and it doesn't use any >> aspect of the ABI. But it does call fopen and fclose. If a call to >> fseeko ever sneaks in there somehow, it will break on AIX in a rather >> mysterious manner. > > I agree. I had considered this too but then went for the inferior patch for > a reason: > > Index: Makefile.in > =================================================================== > --- Makefile.in (revision 166028) > +++ Makefile.in (working copy) > @@ -3949,7 +3949,11 @@ $(genprog:%=build/gen%$(build_exeext)): > > # Generated source files for gengtype. > gengtype-lex.c : gengtype-lex.l > - -$(FLEX) $(FLEXFLAGS) -o$@ $< > + -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ > + echo '#include "bconfig.h"' > $@.tmp; \ > + cat $@ >> $@.tmp; \ > + mv $@.tmp $@; \ > + } > > # > > # Remake internationalization support. > > The advantage of this, if anything, is that something like that might be > wrapped in automake's ylwrap script. > > However, Ian---depending on the order in which David tests the various > approaches, your patch is okay if it works. > > Paolo >
David Edelsohn <dje.gcc@gmail.com> writes:
> Inserting bconfig.h first seems the most localized approach.
I agree and I'd like to go with that approach if it works.
Thanks.
Ian
Paolo, Your Makefile patch seems to work as well, I am past building gengtype-lex step in bootstrap. Thanks, David On Tue, Nov 9, 2010 at 11:55 AM, Paolo Bonzini <bonzini@gnu.org> wrote: > On 11/09/2010 05:46 PM, Ian Lance Taylor wrote: >> >> David Edelsohn<dje.gcc@gmail.com> writes: >> >>> With Paolo's patch, my bootstrap has progressed into stage 2. >>> Hopefully the Flex-generated file is the only case where header files >>> are included in the wrong order. Paolo's patch definitely is a step >>> in the right direction. >> >> Paolo's patch makes me a little bit uncomfortable because it means that >> gengtype-lex.l is compiled with a different ABI than the rest of the >> compiler. Of course it's a very simple file and it doesn't use any >> aspect of the ABI. But it does call fopen and fclose. If a call to >> fseeko ever sneaks in there somehow, it will break on AIX in a rather >> mysterious manner. > > I agree. I had considered this too but then went for the inferior patch for > a reason: > > Index: Makefile.in > =================================================================== > --- Makefile.in (revision 166028) > +++ Makefile.in (working copy) > @@ -3949,7 +3949,11 @@ $(genprog:%=build/gen%$(build_exeext)): > > # Generated source files for gengtype. > gengtype-lex.c : gengtype-lex.l > - -$(FLEX) $(FLEXFLAGS) -o$@ $< > + -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ > + echo '#include "bconfig.h"' > $@.tmp; \ > + cat $@ >> $@.tmp; \ > + mv $@.tmp $@; \ > + } > > # > > # Remake internationalization support. > > The advantage of this, if anything, is that something like that might be > wrapped in automake's ylwrap script. > > However, Ian---depending on the order in which David tests the various > approaches, your patch is okay if it works. > > Paolo >
On 11/11/2010 05:05 PM, David Edelsohn wrote: > Paolo, > > Your Makefile patch seems to work as well, I am past building > gengtype-lex step in bootstrap. Can you commit it if it passes? Paolo
Index: Makefile.in =================================================================== --- Makefile.in (revision 166028) +++ Makefile.in (working copy) @@ -3949,7 +3949,11 @@ $(genprog:%=build/gen%$(build_exeext)): # Generated source files for gengtype. gengtype-lex.c : gengtype-lex.l - -$(FLEX) $(FLEXFLAGS) -o$@ $< + -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ + echo '#include "bconfig.h"' > $@.tmp; \ + cat $@ >> $@.tmp; \ + mv $@.tmp $@; \ + } #