This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [LTO merge][5/15] Documentation


On Fri, Oct 2, 2009 at 13:31, Joseph S. Myers <joseph@codesourcery.com> wrote:

>> +To use the link-timer optimizer, @code{-flto} needs to be specified at
>> +compile time and during the final link. ÂFor example,
>
> @option{-flto}

Fixed.

> Not a doc issue, but why is the option -use-linker-plugin needed? ÂWhy
> isn't it enabled by default if you configured with --enable-gold? Â(If
> there are special cases where you don't want to use the plugin, there
> could be a special option -no-use-linker-plugin to disable it.)

I think it was mostly so that we could test both collect2 and
gold+plugin without having to reconfigure and rebuild the compiler.
This could probably disappear now.

> (An angle a lot of my questions come from is, "What if I add -flto to the
> compiler and linker options for an existing program with an existing build
> system?".

The design is such that the answer should be: It Should Just Work.
Anything that doesn't work is due to bugs in the implementation and
should be treated as any other bug.

With -r, the regular linker will just drop the IL sections, but when
using gold and the linker plugin, the linker will take the IL portions
and combine them together via the plugin.  However, I have not tested
this.  Again it should just work, but there are probably bugs.  We
have built internal applications by essentially just dropping -flto in
the build process (I don't think we use -r, though).

LTO really just means merging a bunch of .o files together as if they
were a single file, but I'm sure there will be edge cases where we'll
need to add more documentation (particularly merging multiple options
which).


Thanks.  Diego.


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