Re: gcc performance and bootstrap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" LDFLAGS="$libs $linker"\
  ../configure \
    --prefix=...../gcc-5.4.0 \
    \
    --with-gxx-include-dir=.....gcc-5.4.0/include/c++ \
    \
    --with-ld=$binutils_path/bin/ld \
    --with-as=$binutils_path/bin/as \
    --with-ar=$binutils_path/bin/ar \
    --with-ranlib=$binutils_path/bin/ranlib \
    \
    --disable-werror \
    --disable-multilib --disable-lto --disable-gold \
    \
    --enable-languages=c,c++
make
make install

The only difference is the presence of --disable-bootstrap in my build script. Also, "ld" is a symlink pointing to the Gold linker.

For the record, it takes about 36s (or 12s) to compile a large .cc file generated with protobuf, depending on the way the compiler is built.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux