tar -Jxf glibc-2.17.tar.xz cd glibc-2.17 if [ ! -r /usr/include/rpc/types.h ]; then su -c 'mkdir -p /usr/include/rpc' su -c 'cp -v sunrpc/rpc/*.h /usr/include/rpc' fi mkdir ../glibc-build cd ../glibc-build ../glibc-2.17/configure \ --prefix=/tools \ --host=$LFS_TGT \ --build=$(../glibc-2.17/scripts/config.guess) \ --disable-profile \ --enable-kernel=2.6.25 \ --with-headers=/tools/include \ libc_cv_forced_unwind=yes \ libc_cv_ctors_header=yes \ libc_cv_c_cleanup=yes make make install echo 'main(){}' > dummy.c $LFS_TGT-gcc dummy.c readelf -l a.out | grep ': /tools' # carefully check the output of this command! /tools/lib, or /tools/lib64 for 64-bit machines appears as the prefix of the dynamic linker rm -v dummy.c a.out cd .. rm -fr glibc-2.17 glibc-build