%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 For 32 bit ABI: echo 'int 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' [Requesting program interpreter: /lib64/ld-linux.so.2] Note that /lib or /lib64 is now the prefix of our dynamic linker.