RFA: Set default optimization level to -O2 for -flto

Richard Guenther richard.guenther@gmail.com
Fri Mar 19 14:25:00 GMT 2010


On Fri, Mar 19, 2010 at 3:07 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Mar 19, 2010 at 6:02 AM, Basile Starynkevitch
> <basile@starynkevitch.net> wrote:
>> Nick Clifton wrote:
>>>
>>>  An alternative action would be to issue a warning message if -flto is
>>>  encountered without any optimization level also being set.  i am not
>>>  sure what people feel about this.
>>
>> I don't have authority to approve anything, but my personal feeling is that
>> make a warning -or perhaps even an error- at link time if the optimization
>> is less than at compile time.
>>
>
> Should we record compiler options in .o files? For some targets, you may need
> -fPIC with -flto if -fPIC is used to build .o files.

We do that (well, sort of and only partly), see lto-opts.c

Richard.

>
> --
> H.J.
>



More information about the Gcc-patches mailing list