[patch][rfc] Enabling more optimizations with -ON
Mon Nov 3 16:39:00 GMT 2014
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
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
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
2014-11-03 Rafael Ávila de Espíndola <email@example.com>
* options.cc (General_options::finalize): Set gc_sections by default
if -O3 or higher is used.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 646 bytes
Desc: not available
More information about the Binutils