This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap comparison failure! (gcc 4.6.x with -O3)
- From: Andi Kleen <andi at firstfloor dot org>
- To: Witold Baryluk <baryluk at smp dot if dot uj dot edu dot pl>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 27 Mar 2011 09:42:24 -0700
- Subject: Re: Bootstrap comparison failure! (gcc 4.6.x with -O3)
- References: <20110327143025.GF7060@smp.if.uj.edu.pl>
Witold Baryluk <baryluk@smp.if.uj.edu.pl> writes:
>
> make BOOT_CFLAGS="$CFLAGS -flto" CFLAGS_FOR_BUILD="$CFLAGS"
> CXXFLAGS_FOR_BUILD="$CXXFLAGS" bootstrap
Easier is to configure with --with-build-config=bootstrap-lto
then you don't need all the magic CFLAGS lines.
> And then waited....
>
> I actually waited 5 days... (each file compiled about 45minutes on average,
> eating 100% of CPU). Normally whole gcc compiles in 25 minutes on this machine.
It sounds like you don't have enough memory? Did you swap? LTO (or
rather the first phase of it) needs quite a bit more memory than a
normal build. I suspect you don't want to do this with less than 4GB,
better 8G.
If you have /tmp in shmfs it is also much worse because there will
be large temporary files in memory too (workaround is to use
TMPDIR=/some/dir/on/disk)
>
> After wait I got this:
You have to use -frandom-seed=1 to avoid LTO bootstrap failures.
If you use the build config line above that is done by default.
-Andi
--
ak@linux.intel.com -- Speaking for myself only