This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using GCC 2.95 as a bootstrap compiler
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Cc: gcc at gcc dot gnu dot org, Geoffrey Keating <geoffk at geoffk dot org>, Richard dot Earnshaw at arm dot com
- Date: Fri, 31 Oct 2003 11:17:25 +0000
- Subject: Re: Using GCC 2.95 as a bootstrap compiler
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Aparently current mainline triggers a bug in GCC 2.95 or we might be
> encountering undefined behavior in our PCH-related code?
>
> In any case, some ten days ago (rough estimate) mainline stopped building
> both with stock GCC 2.95.3 and the FreeBSD system compiler (GCC 2.95.4) on
> i386-unknown-freebsd4.8:
>
> /sw/gcc-2.95.3/bin/gcc -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengtype \
> gengtype.o gengtype-lex.o gengtype-yacc.o ../libiberty/libiberty.a
> ./gengtype
> /sw/test/gcc/cvs/gcc/input.h:27: parse error, unexpected ENT_YACCUNION, expecting GTY_TOKEN
> gmake[2]: *** [s-gtype] Error 1
> gmake[2]: Leaving directory `/files/pfeifer/OBJ-1031-1155/gcc'
> gmake[1]: *** [stage1_build] Error 2
>
> Gerald
I came across this the other night. It's a version skew of
gengtype-yacc.h between an obsolete copy in the source tree and a
generated copy in the build tree. gcc-2.95 was including the files in a
different order based on #line directives[1].
Remove the copies of gengtype-*.[ch] from your source tree and the problem
all goes away.
R.
[1] I'm not a cpp expert, but I'm surprised that this changed with the new
pre-processor.