This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Exploring gcc-in-cxx compiler build requirements
- From: Ian Lance Taylor <iant at google dot com>
- To: Jerry Quinn <jlquinn at optonline dot net>
- Cc: "gcc\ at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 29 Jun 2009 13:39:50 -0700
- Subject: Re: Exploring gcc-in-cxx compiler build requirements
- References: <1246158585.4098.182.camel@cerberus.qb5.org>
Jerry Quinn <jlquinn@optonline.net> writes:
> Both 3.1.1 and 3.2.3 fail to bootstrap with the following error:
>
> make[1]: Entering directory `/home/jlquinn/gcc/dev/build/gcc323/gcc'
> gcc -c -DIN_GCC --std=gnu89 -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
> -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I.
> -I../../../gcc-3.2.3/gcc -I../../../gcc-3.2.3/gcc/.
> -I../../../gcc-3.2.3/gcc/config
> -I../../../gcc-3.2.3/gcc/../include ../../../gcc-3.2.3/gcc/read-rtl.c -o
> read-rtl.o
> In file included from ../../../gcc-3.2.3/gcc/read-rtl.c:24:
> ../../../gcc-3.2.3/gcc/rtl.h:125: warning: type of bit-field âcodeâ is a
> GCC extension
> ../../../gcc-3.2.3/gcc/rtl.h:128: warning: type of bit-field âmodeâ is a
> GCC extension
> ../../../gcc-3.2.3/gcc/read-rtl.c: In function
> âfatal_with_file_and_lineâ:
> ../../../gcc-3.2.3/gcc/read-rtl.c:62: warning: traditional C rejects ISO
> C style function definitions
> ../../../gcc-3.2.3/gcc/read-rtl.c: In function âread_rtxâ:
> ../../../gcc-3.2.3/gcc/read-rtl.c:662: error: lvalue required as
> increment operand
> make[1]: *** [read-rtl.o] Error 1
> make[1]: Leaving directory `/home/jlquinn/gcc/dev/build/gcc323/gcc'
> make: *** [all-gcc] Error 2
It looks like you are trying to build gcc 3.1.1 and 3.2.3 with the
current gcc. This is known to fail. It is (unfortunately) the case
that if you want to build an old version of gcc, you sometimes have to
walk backward--use version N to build version N-1, use version N-1 to
build version N-2, etc. You don't have to hit every version, but you
can't skip too far.
> 3.3.6 old compiler builds. branch bootstrap fails with:
Actually, there is no longer any reason to use the gcc-in-cxx branch.
What you should do now is build trunk using the configure argument
--build-with-cxx.
> make[3]: Entering directory
> `/home/jlquinn/gcc/dev/gcc-in-cxx/host-x86_64-unknown-linux-gnu/gcc'
> g++ -c -g -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual
> -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I.
> -I../.././gcc -I../.././gcc/. -I../.././gcc/../include
> -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber
> -I../.././gcc/../libdecnumber/bid
> -I../libdecnumber ../.././gcc/c-lang.c -o c-lang.o
> In file included from /home/jlquinn/gcc/dev/run/gcc336/include/c
> ++/3.3.6/iosfwd:46,
> from /usr/include/gmp-x86_64.h:24,
> from /usr/include/gmp.h:59,
> from ../../gcc/double-int.h:24,
> from ../../gcc/tree.h:30,
> from ../../gcc/c-lang.c:27:
> /home/jlquinn/gcc/dev/run/gcc336/include/c
> ++/3.3.6/x86_64-unknown-linux-gnu/bits/c++locale.h:61:40: attempt to use
> poisoned "malloc"
We may need to ensure that when using C++ gmp.h is included before
system.h. Or simply #include <iosfwd> in or before system.h.
Ian