toolchain stuff

Robert Connolly robert at
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 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 and

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the hlfs-dev mailing list