This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]


On 11/09/2010 05:46 PM, Ian Lance Taylor wrote:
David Edelsohn<> 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:

---	(revision 166028)
+++	(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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]