Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 371951 - sys-devel/llvm: Add the USE-flag "gold" for building the LLVMgold.so plugin for the gold linker necessary for link time optimization
Summary: sys-devel/llvm: Add the USE-flag "gold" for building the LLVMgold.so plugin f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 19:39 UTC by Matthias Maier
Modified: 2013-12-16 06:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed ebuild with USE-flag "gold" (llvm-2.9-r3.ebuild.patch,1.31 KB, patch)
2011-06-16 19:42 UTC, Matthias Maier
Details | Diff
Proposed ebuild with USE-flag "gold" (llvm-2.9-r3.ebuild.patch,1.32 KB, patch)
2011-06-16 20:08 UTC, Matthias Maier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2011-06-16 19:39:03 UTC
The llvm compiler does support link time optimization ( http://llvm.org/docs/LinkTimeOptimization.html ). For this to work correctly a plugin for the gold linker is necessary ( http://llvm.org/docs/GoldPlugin.html ).

The gold linker comes automatically shipped with >=sys-devel/binutils-2.21 as ld.gold (along with the necessary plugin support enabled). So the only thing left to do is to provide the "--with-binutils-include=<...>" flag in the configure phase of the llvm ebuild.

So I propose a new USE-flag "gold" for doing this.

As soon as binutils-2.21 go stable, or the gold linker does replace the old GNU linker this USE-flag will become obsolete (one can just always enable --with-binutils-include). In the meantime the USE-flag would have the main effect that if a user doesn't care about the gold plugin he doesn't have to upgrade to an unstable binutils just for having llvm.

Reproducible: Always
Comment 1 Matthias Maier gentoo-dev 2011-06-16 19:42:33 UTC
Created attachment 277285 [details, diff]
Proposed ebuild with USE-flag "gold"

The proposed ebuild with support for a "gold" USE-flag.

This would go along with a line 

sys-devel/llvm:gold - Build the LLVMgold.so plugin for the gold linker necessary for link time optimization

in use.local.desc
Comment 2 Matthias Maier gentoo-dev 2011-06-16 20:08:51 UTC
Created attachment 277291 [details, diff]
Proposed ebuild with USE-flag "gold"

*blush*
Comment 3 Bernard Cafarelli gentoo-dev 2011-11-10 11:57:03 UTC
Thanks for the report!
While working on llvm 3.0 ebuild (still rc), I tried to enable the gold plugin, but sadly binutils 2.21.1 is not new enough for it:
http://llvm.org/bugs/show_bug.cgi?id=9674

Keeping the bug open in the meantime :)
Also I think the "gold" USE-flag will stay for some time, as I am not sure binutils-apple has gold linker
Comment 4 Bernard Cafarelli gentoo-dev 2011-11-22 13:42:07 UTC
With binutils 2.22 out , I could finally test the plugin compilation. Support for gold plugin is available in 3.0_rc ebuild based on your patch, and will soon be available when 3.0 final is out.

Thanks again for the report!
Comment 5 Matthias Maier gentoo-dev 2011-11-22 17:17:11 UTC
(In reply to comment #4)

> Thanks again for the report!

Thanks for including the patch :)