%general-entities; ]> Adjusting the Toolchain gcc -dumpspecs | \ perl -p -e 's@/tools/lib/ld@/lib/ld@g;' \ -e 's@/tools/lib64/ld@/lib64/ld@g;' \ -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' > \ $(dirname $(gcc --print-libgcc-file-name))/specs Note that /lib or /lib64 is now the prefix of our dynamic linker. For 32 bit ABI: echo 'main(){}' > dummy.c gcc ${BUILD32} dummy.c readelf -l a.out | grep ': /lib' For 64 bit ABI: echo 'main(){}' > dummy.c gcc ${BUILD64} dummy.c readelf -l a.out | grep ': /lib' Note that /lib or /lib64 is now the prefix of our dynamic linker.