From subsecret
Jump to: navigation, search

libcap

We need libcap so glibc can be build

tar xf libcap-2.22.tar.gz
cd libcap-2.22
make

Since "make install" is broken, we manually copy needed files

cp -R libcap/include/ /tools
cp libcap/libcap*.so* /tools/lib
cp libcap/include/sys/capability.h /tools/include/sys/
cd ..

glibc

Now we can build glibc

tar xf glibc-2.17.tar.xz
mkdir glibc-2.17-build
cd glibc-2.17-build
../glibc-2.17/configure --prefix=/tools/ --enable-add-ons --enable-kernel=3.8.8 --with-headers=/tools/include
make -j 8
make install
cd ..

glibc contains "ldd" which needs to be fixed to use right path. Edit /tools/bin/ldd and replace RTLDLIST=XXXXX with RTLDLIST="/tools/lib/ld-linux.so.2 /tools/lib/ld-linux-x86-64.so.2"