Witold Baryluk <bary...@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

-- 
a...@linux.intel.com -- Speaking for myself only

Reply via email to