[Bug c++/69635] 4x increase of build time [4.9 -> 6.0]

2016-02-02 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69635

--- Comment #1 from Jonathan Wakely  ---
Did you build gcc6 with --enable-checking=release ?

[Bug c++/69635] 4x increase of build time [4.9 -> 6.0]

2016-02-02 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69635

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #2 from Markus Trippelsdorf  ---
You can speed up the build time by using -flto=.

With -flto=4 it compiles in ~5 minutes on my machine with gcc-6
(checking=release).

Closing as invalid.

[Bug c++/69635] 4x increase of build time [4.9 -> 6.0]

2016-02-02 Thread h2+bugs at fsfe dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69635

--- Comment #3 from h2+bugs at fsfe dot org ---
Thank you for the quick replies!

> Did you build gcc6 with --enable-checking=release ?

I am using the pre-built FreeBSD packages, I have checked, and it seems it is
not the case. That likely explains it... I will double-check with the package
maintainer.

> You can speed up the build time by using -flto=.

Ah, that's very interesting! I hadn't seen -flto with a number yet. Is there
more documentation on it? 
Is this the "WHOPR" mode described here:
https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html ?
I had previously thought flto was only useful when linking multiple translation
units... Does it have an effect on the produced binary?

[Bug c++/69635] 4x increase of build time [4.9 -> 6.0]

2016-02-02 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69635

--- Comment #4 from Markus Trippelsdorf  ---
(In reply to h2+bugs from comment #3)
> Thank you for the quick replies!
> 
> > Did you build gcc6 with --enable-checking=release ?
> 
> I am using the pre-built FreeBSD packages, I have checked, and it seems it
> is not the case. That likely explains it... I will double-check with the
> package maintainer.
> 
> > You can speed up the build time by using -flto=.
> 
> Ah, that's very interesting! I hadn't seen -flto with a number yet. Is there
> more documentation on it? 

Sure, in the compiler manual.

> Is this the "WHOPR" mode described here:
> https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html ?
> I had previously thought flto was only useful when linking multiple
> translation units... Does it have an effect on the produced binary?

For a single translation unit generally no. It just runs some 
optimizations and the code generation in parallel, hence the speedup.