1 |
On Mon, Jun 4, 2012 at 4:39 PM, Nikos Chantziaras <realnc@×××××.com> wrote: |
2 |
> |
3 |
>> Did you use gold or the standard linker? |
4 |
> |
5 |
> |
6 |
> The standard one. I didn't actually think about the importance of this. |
7 |
> Does gold work better with LTO? |
8 |
|
9 |
I don't know much about it, but AFAIK gold is supposed to be several |
10 |
times faster at linking in general, and when using it in combination |
11 |
with gcc+LTO the compiler actually offloads some of the LTO processing |
12 |
to the linker which is supposed to be more efficient. |
13 |
|
14 |
I've never tried it personally, but I just googled and found this |
15 |
mentioned on the GCC site: |
16 |
|
17 |
"As an added feature, LTO will take advantage of the plugin feature in |
18 |
gold. This allows the compiler to pick up object files that may have |
19 |
been stored in library archives. To use this feature, you must be |
20 |
using gold as the linker and enable the use of the plugin by compiling |
21 |
with gcc -fuse-linker-plugin. This will shift the responsibility of |
22 |
driving the final stages of compilation from collect2 to gold via the |
23 |
linker plugin." |
24 |
|
25 |
And in gentoo you can switch to gold as explained on the wiki: |
26 |
https://wiki.gentoo.org/wiki/Gold |