https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111605
--- Comment #6 from Rui Ueyama <rui314 at gmail dot com> --- Since mold supports all targets by a single executable, it doesn't make much sense to install one mold executable for each embedded toolchain. So if we want to keep the current gcc's lookup mechanism for `ld` executable, we want to install mold somewhere in the system and install a symlink for each target, and that's not compatible with relocatable emddeded toolchain directory. We need to adjust the realpath of a symlink to point to the mold executable file. All in all, the problem wouldn't exist at all if gcc just looks for `ld.mold`? (I'm not suggesting making a change to the default behavior; I'd do that only if `-fuse-ld=mold` or `-fuse-ld=lld` is givne.)