* [gentoo-user] GCC 4.7 and LTO: it works
@ 2012-06-04 20:19 Nikos Chantziaras
2012-06-04 21:21 ` Paul Hartman
2012-06-05 14:28 ` [gentoo-user] " Stefan G. Weichinger
0 siblings, 2 replies; 9+ messages in thread
From: Nikos Chantziaras @ 2012-06-04 20:19 UTC (permalink / raw
To: gentoo-user
I've emerged system and world with gcc-4.7.0 and LTO. I'm posting from
it right now :-) It's a KDE system with 1043 packages installed.
I've posted details on how to do this (including info on how to disable
LTO for specific packages that don't work with it) here:
http://realnc.blogspot.com/2012/06/building-gentoo-linux-with-gcc-47-and.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] GCC 4.7 and LTO: it works
2012-06-04 20:19 [gentoo-user] GCC 4.7 and LTO: it works Nikos Chantziaras
@ 2012-06-04 21:21 ` Paul Hartman
2012-06-04 21:39 ` [gentoo-user] " Nikos Chantziaras
2012-06-05 14:28 ` [gentoo-user] " Stefan G. Weichinger
1 sibling, 1 reply; 9+ messages in thread
From: Paul Hartman @ 2012-06-04 21:21 UTC (permalink / raw
To: gentoo-user
On Mon, Jun 4, 2012 at 3:19 PM, Nikos Chantziaras <realnc@gmail.com> wrote:
> I've emerged system and world with gcc-4.7.0 and LTO. I'm posting from it
> right now :-) It's a KDE system with 1043 packages installed.
>
> I've posted details on how to do this (including info on how to disable LTO
> for specific packages that don't work with it) here:
>
> http://realnc.blogspot.com/2012/06/building-gentoo-linux-with-gcc-47-and.html
Thanks. I'm not sure if I'm ready to recompile world yet, but we'll
see where curiosity and boredom lead me. :) I have an older, slower
machine that might benefit more from small optimizations. A few
questions:
Do you have any measure of compile times using lto compared to not using it?
Was there any effect on quality of debugging info in the resulting
binaries? I thought I read at some point there was no (or bad) debug
info with LTO. Maybe I'm thinking about clang, though.
Did you use gold or the standard linker?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: GCC 4.7 and LTO: it works
2012-06-04 21:21 ` Paul Hartman
@ 2012-06-04 21:39 ` Nikos Chantziaras
2012-06-04 22:37 ` Paul Hartman
0 siblings, 1 reply; 9+ messages in thread
From: Nikos Chantziaras @ 2012-06-04 21:39 UTC (permalink / raw
To: gentoo-user
On 05/06/12 00:21, Paul Hartman wrote:
> On Mon, Jun 4, 2012 at 3:19 PM, Nikos Chantziaras<realnc@gmail.com> wrote:
>> I've emerged system and world with gcc-4.7.0 and LTO. I'm posting from it
>> right now :-) It's a KDE system with 1043 packages installed.
>>
>> I've posted details on how to do this (including info on how to disable LTO
>> for specific packages that don't work with it) here:
>>
>> http://realnc.blogspot.com/2012/06/building-gentoo-linux-with-gcc-47-and.html
> [...]
> Do you have any measure of compile times using lto compared to not using it?
It was pretty obvious without doing any actual measurement: linking is
slower with LTO. Large programs even take several minutes for the link
step.
> Was there any effect on quality of debugging info in the resulting
> binaries? I thought I read at some point there was no (or bad) debug
> info with LTO. Maybe I'm thinking about clang, though.
Didn't notice anything strange yet. But I suspect that this isn't
important to begin with; all we need are backtraces. Thorough debugging
symbols are not important for emerged packages.
> Did you use gold or the standard linker?
The standard one. I didn't actually think about the importance of this.
Does gold work better with LTO?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: GCC 4.7 and LTO: it works
2012-06-04 21:39 ` [gentoo-user] " Nikos Chantziaras
@ 2012-06-04 22:37 ` Paul Hartman
2012-06-04 22:53 ` Nikos Chantziaras
0 siblings, 1 reply; 9+ messages in thread
From: Paul Hartman @ 2012-06-04 22:37 UTC (permalink / raw
To: gentoo-user
On Mon, Jun 4, 2012 at 4:39 PM, Nikos Chantziaras <realnc@gmail.com> wrote:
>
>> Did you use gold or the standard linker?
>
>
> The standard one. I didn't actually think about the importance of this.
> Does gold work better with LTO?
I don't know much about it, but AFAIK gold is supposed to be several
times faster at linking in general, and when using it in combination
with gcc+LTO the compiler actually offloads some of the LTO processing
to the linker which is supposed to be more efficient.
I've never tried it personally, but I just googled and found this
mentioned on the GCC site:
"As an added feature, LTO will take advantage of the plugin feature in
gold. This allows the compiler to pick up object files that may have
been stored in library archives. To use this feature, you must be
using gold as the linker and enable the use of the plugin by compiling
with gcc -fuse-linker-plugin. This will shift the responsibility of
driving the final stages of compilation from collect2 to gold via the
linker plugin."
And in gentoo you can switch to gold as explained on the wiki:
https://wiki.gentoo.org/wiki/Gold
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: GCC 4.7 and LTO: it works
2012-06-04 22:37 ` Paul Hartman
@ 2012-06-04 22:53 ` Nikos Chantziaras
0 siblings, 0 replies; 9+ messages in thread
From: Nikos Chantziaras @ 2012-06-04 22:53 UTC (permalink / raw
To: gentoo-user
On 05/06/12 01:37, Paul Hartman wrote:
> On Mon, Jun 4, 2012 at 4:39 PM, Nikos Chantziaras<realnc@gmail.com> wrote:
>>
>>> Did you use gold or the standard linker?
>>
>>
>> The standard one. I didn't actually think about the importance of this.
>> Does gold work better with LTO?
>
> I don't know much about it, but AFAIK gold is supposed to be several
> times faster at linking in general, and when using it in combination
> with gcc+LTO the compiler actually offloads some of the LTO processing
> to the linker which is supposed to be more efficient.
Sounds like it's worth trying, but one thing doesn't look good; Diego's
blog is full of articles about Gold breakage:
http://blog.flameeyes.eu/tag/gold
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] GCC 4.7 and LTO: it works
2012-06-04 20:19 [gentoo-user] GCC 4.7 and LTO: it works Nikos Chantziaras
2012-06-04 21:21 ` Paul Hartman
@ 2012-06-05 14:28 ` Stefan G. Weichinger
2012-06-05 15:54 ` [gentoo-user] " Nikos Chantziaras
1 sibling, 1 reply; 9+ messages in thread
From: Stefan G. Weichinger @ 2012-06-05 14:28 UTC (permalink / raw
To: gentoo-user
Am 04.06.2012 22:19, schrieb Nikos Chantziaras:
> I've emerged system and world with gcc-4.7.0 and LTO. I'm posting from
> it right now :-) It's a KDE system with 1043 packages installed.
>
> I've posted details on how to do this (including info on how to disable
> LTO for specific packages that don't work with it) here:
>
> http://realnc.blogspot.com/2012/06/building-gentoo-linux-with-gcc-47-and.html
Gave it a try out of curiosity ... got @system emerged OK now ...
Did you also apply it to compiling the kernel?
Worth it?
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: GCC 4.7 and LTO: it works
2012-06-05 14:28 ` [gentoo-user] " Stefan G. Weichinger
@ 2012-06-05 15:54 ` Nikos Chantziaras
2012-06-05 16:56 ` Stefan G. Weichinger
0 siblings, 1 reply; 9+ messages in thread
From: Nikos Chantziaras @ 2012-06-05 15:54 UTC (permalink / raw
To: gentoo-user
On 05/06/12 17:28, Stefan G. Weichinger wrote:
> Am 04.06.2012 22:19, schrieb Nikos Chantziaras:
>> I've emerged system and world with gcc-4.7.0 and LTO. I'm posting from
>> it right now :-) It's a KDE system with 1043 packages installed.
>>
>> I've posted details on how to do this (including info on how to disable
>> LTO for specific packages that don't work with it) here:
>>
>> http://realnc.blogspot.com/2012/06/building-gentoo-linux-with-gcc-47-and.html
>
> Gave it a try out of curiosity ... got @system emerged OK now ...
>
> Did you also apply it to compiling the kernel?
> Worth it?
Kernel builds and runs fine with 4.7. But I didn't try to use LTO on
it. I actually never try to force any custom CFLAGS on the kernel
build. I trust upstream to pick safe and fast ones.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: GCC 4.7 and LTO: it works
2012-06-05 15:54 ` [gentoo-user] " Nikos Chantziaras
@ 2012-06-05 16:56 ` Stefan G. Weichinger
2012-06-05 21:34 ` Stefan G. Weichinger
0 siblings, 1 reply; 9+ messages in thread
From: Stefan G. Weichinger @ 2012-06-05 16:56 UTC (permalink / raw
To: gentoo-user
Am 05.06.2012 17:54, schrieb Nikos Chantziaras:
> Kernel builds and runs fine with 4.7. But I didn't try to use LTO on
> it. I actually never try to force any custom CFLAGS on the kernel
> build. I trust upstream to pick safe and fast ones.
Good choice.
Yes, I also run gentoo-sources-3.4.0 (waiting for 3.4.1 already)
compiled with gcc-4.7.0 successfully for days now.
S
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: GCC 4.7 and LTO: it works
2012-06-05 16:56 ` Stefan G. Weichinger
@ 2012-06-05 21:34 ` Stefan G. Weichinger
0 siblings, 0 replies; 9+ messages in thread
From: Stefan G. Weichinger @ 2012-06-05 21:34 UTC (permalink / raw
To: gentoo-user
Am 2012-06-05 18:56, schrieb Stefan G. Weichinger:
> Am 05.06.2012 17:54, schrieb Nikos Chantziaras:
>
>> Kernel builds and runs fine with 4.7. But I didn't try to use LTO on
>> it. I actually never try to force any custom CFLAGS on the kernel
>> build. I trust upstream to pick safe and fast ones.
>
> Good choice.
>
> Yes, I also run gentoo-sources-3.4.0 (waiting for 3.4.1 already)
> compiled with gcc-4.7.0 successfully for days now.
had to add
sys-process/procps (3.3.3)
to my
/etc/portage/package.env
fyi
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-06-05 21:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 20:19 [gentoo-user] GCC 4.7 and LTO: it works Nikos Chantziaras
2012-06-04 21:21 ` Paul Hartman
2012-06-04 21:39 ` [gentoo-user] " Nikos Chantziaras
2012-06-04 22:37 ` Paul Hartman
2012-06-04 22:53 ` Nikos Chantziaras
2012-06-05 14:28 ` [gentoo-user] " Stefan G. Weichinger
2012-06-05 15:54 ` [gentoo-user] " Nikos Chantziaras
2012-06-05 16:56 ` Stefan G. Weichinger
2012-06-05 21:34 ` Stefan G. Weichinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox