Change default BOOT_CFLAGS for release builds

Dimitrios Apostolou jimis@gmx.net
Fri Aug 3 14:11:00 GMT 2012


Hello,

I got no replies, so I guess there is no will to move GCC to -O3 by 
default, so I shouldn't bother submitting a patch?

As a reminder, cc1 is 0-4% faster but almost 10% bigger executable. 
Testsuite showed no regression. Bootstrap time is greater (don't have the 
numbers) but I proposed adding and documenting a "make release" target 
that would be used by distros, while default target would remain -O2 (or 
even -O1) so that our test builds complete in sensible time.

In the future we could also turn on other stable ways to speed up GCC for 
release builds (e.g. lto/profiledbootstrap).


Thanks,
Dimitris




On Wed, 11 Jul 2012, Dimitrios Apostolou wrote:
> Hello list,
>
> we discussed the subject in the BOF but I didn't quite get what the consensus 
> is, so that I can start changing things.
>
> What I have in mind is to introduce and document a new "make release" target 
> that builds GCC in the fastest /stable/ way possible, for example 
> --enable-checking=release BOOT_CFLAGS=-O3. I don't know what are the exact 
> options we want, personally I tried -O3 and cc1 was 0% - 4% with no 
> regressions, so IMHO we definitely want -O3 as default. I'm curious also 
> about lto and profiledbootstrap but don't know if they should be default, in 
> any case if anything gets worse we can revert.
>
> The actual purpose of adding a separate "release" target and documenting it 
> properly is for all distributors (besides the ones having specific 
> constraints, like embedded) to actually build GCC in the best way possible. 
> Since we will be making sure no problems are introduced with -O3/lto/whatever 
> this will also be a great way to advertise that these build methods actually 
> work well, and it's an advantage over other compilers. Finally, that way the 
> default target can remain -O2 (or even -O1) so that all our test bootstraps 
> complete in sensible time.
>
> So, what do you think?
>
>
> Thanks,
> Dimitris
>
>
> P.S. Size change for stripped cc1 is almost 10% between -O2 and -O3:
>
> $ wc -c cc1*
> 10858100 cc1.O2
> 12103284 cc1.O3
>
>



More information about the Gcc mailing list