I have also been fighting with this. I add: enable_static=no pic_mode=yes to /usr/share/config.site. And despite this a lot of packages install static libraries. I don't install the static versions of zlib or libbz2. I also build with: --fatal-warnings --warn-shared-textrel
in gcc's specs, which causes non-pic shared libraries to fail to compile, and also causes mktemp() and tmpnam() to cause build failures. Most of the time these have patches, from bsd projects. I move libc.a, and all other possible .a files, to /usr/lib/static. This causes ./configure tests for 'gcc -static' to fail, which is fine with me. In general there are always patches available, from redhat or gentoo, to use libtool to create shared libraries (pic ones too). Building a system without static libraries is not a simple thing. Making it all pic, and disallowing linker warnings from mktemp/tmpnam, only complicates it. Outside of hlfs I thought there was very little interest in this. Hlfs wants shared libraries for two reasons... to use aslr, and so packages are simple to upgrade (the same reason you have)... so any given package can be patched without the need to patch any other package due to security fixes in libraries. I would be happy to start documenting how to disallow static libraries, and non-pic libraries, but this should get a homepage so people get an overview of effected packages. Perhaps just a gigantic trac ticket that will never be resolved. 'make install' could be an alias for 'make install ; find /usr/lib -name "*.a"'. If I remember correctly, there is an hlfs-dev post about how to make liby.a a shared library. As far as I know, there are no exceptions. libiberty is doable too. robert
pgpvoEMDLVqB2.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page