This is the mail archive of the
mailing list for the GCC project.
Re: Change default BOOT_CFLAGS for release builds
- From: Dimitrios Apostolou <jimis at gmx dot net>
- To: gcc at gcc dot gnu dot org
- Cc: Andrey Belevantsev <abel at ispras dot ru>
- Date: Fri, 3 Aug 2012 17:11:04 +0300 (EEST)
- Subject: Re: Change default BOOT_CFLAGS for release builds
- References: <alpine.LNX.email@example.com>
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).
On Wed, 11 Jul 2012, Dimitrios Apostolou wrote:
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?
P.S. Size change for stripped cc1 is almost 10% between -O2 and -O3:
$ wc -c cc1*