On 03-27 09:42, Andi Kleen wrote:
> 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.

As you see I actually use --with-build-config=bootstrap-lto. :)
Will try without manually setting CFLAGS.
The problem with documentation is that not all aspects of build
are explained on build instruction webpage.
So I'm just experimenting, and looking what will happen.

> 
> > 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.

No. cc1 uses about 65MB of ram. Plenty of free RAM, and no swaping.
Machine have 2GB of RAM.

> 
> 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)

Yes, actually TMP/TEMP/TMPDIR variables are set just beforce ./configure...
and points to fast and big file system.

> 
> >
> > 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.

Ok. I will try random-seed.

Thanks!

-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl

Attachment: signature.asc
Description: Digital signature

Reply via email to