Bug#631178: Package LLVM gold plugin (for clang LTO)

Anders Kaseorg andersk at MIT.EDU
Tue Jun 21 07:49:20 UTC 2011


Package: llvm-2.9
Version: 2.9+dfsg-1
Severity: wishlist

(Copying this from http://bugs.debian.org/596970#10 to a new bug.)

To link the output of ‘clang -O4’, you need to have binutils-gold and the 
LLVM gold plugin (LLVMgold.so) installed, and link with ‘clang 
-use-gold-plugin’.  The Debian LLVM package currently doesn’t build or 
install the gold plugin.  But that should easy to fix:

1. Adding binutils-dev (>= 2.20.51.20100222-1~) to BUILDDEPS and 
   --with-binutils-include=/usr/include to llvm_confargs causes 
   LLVMgold.so to be built and installed at 
   /usr/lib/llvm-2.9/lib/LLVMgold.so.
2. clang only looks for the plugin at /usr/lib/LLVMgold.so, while ar and 
   nm only look for the plugin at /usr/lib/bfd-plugins/LLVMgold.so, so the 
   plugin needs to be installed or symlinked to both of those two 
   locations.
3. Since LLVMgold.so depends on libLTO.so and Debian strips rpaths from 
   .so files, libLTO.so needs to be available at /usr/lib/libLTO.so (or 
   somewhere else in the dynamic linker search path).

Anders





More information about the Pkg-llvm-team mailing list