This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc performance and bootstrap
On 2017.01.25 at 09:51 -0800, Oleg Smolsky wrote:
> On 2017-01-25 01:22, Jonathan Wakely wrote:
> > On 25 January 2017 at 01:45, Oleg Smolsky wrote:
> > > I've just noticed that gcc5.4 is 3x faster on large/complex files when it is
> > > built with --enable-bootstrap (as opposed to --disable-bootstrap). I thought
> > > that the stage2 compiler is already built with itself and so there should be
> > > no difference between stage2 and stage3 compilers... (the host's compiler is
> > > gcc 4.8)
> > >
> > > Do you know what's going on?
> > Are you sure --enable-bootstrap is the only difference, and one isn't
> > build with --enable-checking?
> >
> > Are both built from the exact 5.4.0 release, not a snapshot?
> Hey Jonathan, yes, I'm building the official gcc 5.4.0 release this way:
>
> rm -rf _obj; mkdir _obj; pushd _obj
> CFLAGS="-I$glibc_path/include" CXXFLAGS="-I$glibc_path/include"
If you use these CXXFLAGS with --disable-bootstrap you disable all
optimizations. So just add "-O2 -g" to your CXXFLAGS and you will get
comparable results.
--
Markus