This is the mail archive of the
mailing list for the binutils project.
Re: [patch][rfc] Enabling more optimizations with -ON
- From: Rafael EspÃndola <rafael dot espindola at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Cary Coutant <ccoutant at google dot com>
- Date: Tue, 18 Nov 2014 19:01:37 -0500
- Subject: Re: [patch][rfc] Enabling more optimizations with -ON
- Authentication-results: sourceware.org; auth=none
- References: <CAG3jRe+UXKKwUq==KLx9TQx2cSr2F-=fgz6cN41TndGoTwgaoQ at mail dot gmail dot com> <CAG3jRe+Ljsrs7BDBo3tMD0wEsZpf1QwUccYiQGAr5bxGRirRKA at mail dot gmail dot com>
On 10 November 2014 09:19, Rafael EspÃndola <firstname.lastname@example.org> wrote:
> On 3 November 2014 11:39, Rafael EspÃndola <email@example.com> wrote:
>> In compilers the -ON options enable various optimizations. Different
>> compilers (and compiler versions) have different ones, but the option
>> itself is commonly available and selects a somewhat corresponding
>> In both bfd ld and gold very few optimizations are enabled with the
>> -ON options. This means that users have to know which optimizations
>> are available:
>> ld ...-O3 --gc-sections --icf=safe....
>> If an optimization is added to one of them, a configure check has to
>> be used to find if the program is being linked with gold or bfd (and
>> which version).
>> As a starting point, the attached patch changes gold to gc sections by
>> default if given -O3 or higher. It can still be disabled with an
>> explicit --no-gc-sections.
>> 2014-11-03 Rafael Ãvila de EspÃndola <firstname.lastname@example.org>
>> * options.cc (General_options::finalize): Set gc_sections by default
>> if -O3 or higher is used.