I'm building a cross compiled LFS using x86_64-unknown-linux-gnu as my host and i686-pc-linux-gnu as my target. In chapter "5.8. GCC-4.1.1 - Cross Compiler Final" before running the command:
make AS_FOR_TARGET="${CLFS_TARGET}-as" LD_FOR_TARGET="${CLFS_TARGET}-ld"
Another few actions should be added: cp -v ${PRRFIX}/lib/crti.o /cross-tool/${CLFS_TARGET}/lib cp -v ${PRRFIX}/lib/crtn.o /cross-tool/${CLFS_TARGET}/lib cp -v ${PRRFIX}/lib/crt1.o /cross-tool/${CLFS_TARGET}/lib This will prevent the failure which it's output is: crti.o: No such file: No such file or directory gcc build or crtn.o: No such file: No such file or directory gcc build
Then also: cp -v ${PRRFIX}/lib/libm.a /cross-tool/${CLFS_TARGET}/lib should be executed. To prevent the failure with the error message: Link tests are not allowed after GCC_NO_EXECUTABLES