Both LFS and CLFS apply patches to the GCC source before building.
The CLFS patches are a bit more involved than the LFS patches, but what they have in common is the changing of the path used to find the dynamic linker. In this case its moved to the location where a new version of glibc is going to be built.
Since, at least in the case of CLFS, you are building a cross toolchain and presumably you cannot run anything built with this chain on your build machine, what difference does it make where GCC has programs look for the dynamic linker. Isn't that a runtime operation which is never going to happen anyway? Also, if you built a binary with this GCC, one which required shared libraries, and attempted to run it on your target wouldn't the path to the dyanmic linker now be wrong?
Additionally (C)LFS has you modify the STANDARD_STARTFILE_PREFIX_X
to point to $INSTALL_PATH/tools/lib/
. Wouldn't those paths presumably be checked when/if you specifiy --with-sysroot
? After building GCC with --with-sysroot
if I check --preint-search-dirs
I don't see it looking in any paths besides ones referenced to either prefix or --with-sysroot
.