[LLVMdev] LLVM 2.7 gcc binary package: please ship libstdc++.so instead of .la + .a

Török Edwin edwintorok at gmail.com
Sun Apr 4 08:58:45 PDT 2010


Hi,

The llvm-gcc binaries I downloaded for the 2.7 prerelease contained a
.la for libstdc++, and a .a file, but no .so file:
/home/edwin/llvm2.7/llvm-gcc-4.2-2.7-x86_64-linux/lib64/libstdc++.la
/home/edwin/llvm2.7/llvm-gcc-4.2-2.7-x86_64-linux/lib64/libstdc++.a

While testing libtool's new LTO support [1] everything broke when it
tried to use that .la file, with millions of messages like this:
/usr/bin/ld: error:
/home/edwin/llvm2.7/llvm-gcc-4.2-2.7-x86_64-linux/lib64/libstdc++.a(functexcept.o):
requires unsupported dynamic reloc; recompile with -fPIC

The problem is that there is no libstdc++.so shipped in llvm-gcc, but
there is a .la and a .a file.
It tries to use the .a file, buts its non-PIC.

So I had to remove the .la and .a file, and put a symlink to the
system's libstdc++.so.6.
(simply removing the files was not enough: -lstdc++ was not found,
simply putting the symlink wasn't enough either since the .a was picked
up still)

I think its a mistake in the binary package: the .la and .a shouldn't be
shipped, and the .so should be built & shipped!

[1]
http://lists.gnu.org/archive/html/libtool/2010-04/msg00003.html

Best regards,
--Edwin



More information about the llvm-dev mailing list