This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Making it easy to use -flto for bootstrap
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Jun 2010 11:26:34 +0200
- Subject: Re: Making it easy to use -flto for bootstrap
- References: <orzkytii3a.fsf@livre.localdomain> <201006172132.10500.ebotcazou@adacore.com>
On Thu, Jun 17, 2010 at 9:32 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Furthermore, simply adding -flto to BOOT_CFLAGS didn't quite work,
>> because Ada doesn't seem to be ready for LTO.
>
> No, it's supposed to work on mainline, there are LTO tests in gnat.dg.
LTO bootstrap indeed fails with Ada (first you run into ICEs due
to -g, then if building without that you get incompatible types of
global syms inside the RTS for some Ada to C bindings if I
understand correctly).
To reproduce:
../configure --enable-stage1-languages=c,lto --enable-gold
--with-plugin-ld=/usr/bin/gold
make BOOT_CFLAGS="-O2 -g -fuse-linker-plugin -fwhopr -B
/path-to-build/prev-lto-plugin/.libs"
same with -flto, for convenience parallelize link with -fwhopr=N. Add
STAGE1_CFLAGS="-O2 -g" for your convenience.
It would be nice to have small reproducers for the -g ICEs.
Richard.
> --
> Eric Botcazou
>