toolchain stuff

Robert Connolly robert at linuxfromscratch.org
Wed Jun 6 00:03:17 PDT 2007


libiberty has been driving me bonkers, because I took -fpic out of the gcc 
specs. With --enable-shared and --with-pic libiberty will build a pic and 
non-pic libiberty.a, but binutils and gcc insist on linking programs to the 
non-pic version, and if the programs are linked with -pie then they crash.

I found a lot of posts concerning libiberty.so. Since 1997 there has been a 
demand for a shared version, because some architectures have no tolerance for 
linking non-pic objects into shared libraries. GCC and Binutils have 
entertained the idea, but it never happened. It looks like they enjoy the 
freedom of being able to break reverse compatibility... they can make any 
changes they want to libiberty, and because it's statically linked there is 
no need to worry if it works in previous binutils/gcc version.

So anyway, I libtool'd the copy from gcc-4.1.2 (no code changes, only changes 
to configure.ac and makefile.am):
http://www.linuxfromscratch.org/~robert/libiberty/libiberty-20070606.tar.bz2

Not done yet... it installs the libraries and info page. Just need to fix it 
to install the header, and a man page would be nice too. And remove unneeded 
top-level-makefile stuff that assumes it's part of GCC. Then patch Binutils 
and GCC to use an external -libiberty.

I also found a standalone package named 'libiberty-1.0.tar.gz' which netbsd 
uses. It's heavily bloated with GCC files, and it does not build a shared 
library. openbsd builds a shared version of libiberty, but the build is 
integrated with their source tree, it does not use libtool, and their 
libiberty is stripped down for their specific needs.

robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20070606/edfdb0f8/attachment.sig>


More information about the hlfs-dev mailing list