Getting more shared libraries out of HLFS

Robert Connolly robert at linuxfromscratch.org
Sun Dec 3 23:30:07 PST 2006


# Binutils shared libiberty:

sed -e 's/libiberty.a/libiberty.so/g' \
	-i {ld,gas,binutils,gprof,opcodes}/Makefile.in

./configure... --with-pic

make tooldir=/usr all-libiberty &&
mkdir libiberty/pic/dynamic &&
cd libiberty/pic/dynamic &&
ar x ../libiberty.a &&
gcc -shared -o libiberty.so -Wl,-soname,libiberty-2.17.so *.o &&
cp libiberty.so ../ &&
cd ../../../ &&
ln -vs pic/libiberty.so libiberty/libiberty.so

make....

env LD_PRELOAD=$(pwd)/libiberty/libiberty.so make check

env LD_PRELOAD=$(pwd)/libiberty/libiberty.so make tooldir=/usr install &&
rm -v /usr/lib/libiberty.a &&
install -v libiberty/libiberty.so /usr/lib/libiberty-2.17.so &&
ln -vs libiberty-2.17.so /usr/lib/libiberty.so

# I'm still checking how well this turns out, but it seems to work.

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/20061204/70dac064/attachment.sig>


More information about the hlfs-dev mailing list