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

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

Hello, Edwin

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

This means that llvm-gcc was compiled in static mode (same problem,
btw, is seen with debian packages - llvm-gcc they ship is pretty
useless due to this). One should configure llvm-gcc w/o
--disable-shared. And yes, both .so and .a should be shipped.

Could you add that bit of advice to
http://llvm.org/docs/Packaging.html so packagers have a single place
to look for it?

Anton Korobeynikov wrote:

Hello, Edwin

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

This means that llvm-gcc was compiled in static mode (same problem,
btw, is seen with debian packages - llvm-gcc they ship is pretty
useless due to this). One should configure llvm-gcc w/o
--disable-shared. And yes, both .so and .a should be shipped.

Thanks. I've updated my script for the next spin of packages.

Nick