This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto] Add support for running execute.exp with -flto
- From: "Diego Novillo" <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "William Maddox" <maddox at google dot com>
- Date: Fri, 19 Oct 2007 18:50:16 -0400
- Subject: Re: [lto] Add support for running execute.exp with -flto
- References: <b798aad50710191541n4fba133ek32cd990f76d31508@mail.gmail.com>
On 10/19/07, Diego Novillo <dnovillo@google.com> wrote:
> To generate fat object files and link them with LTO afterwards:
>
> $ gcc -c -flto f1.c
> $ gcc -c -flto f2.c
> $ gcc -o f f1.o f2.o
>
> Notice that -flto is not needed in the final link command.
I was wrong. I got confused by my script that always puts -flto in
the gcc call. The LTO behaviour is *only* done if -flto is given in
the final link command.
So, the final link *does* need -flto to do the link-time step.
Apologies for the confusion.