Supersedes D80225. Add --ld-path= to avoid strange target specific
prefixes and make -fuse-ld= focus on its intended job: "linker flavor".
The way --ld-path= works is similar to "Command Search and Execution" in POSIX.1-2017 2.9.1 Simple Commands.
If --ld-path= specifies
- an absolute path, the value specifies the linker.
- a relative path without a path component separator (/), the value is searched using the -B, COMPILER_PATH, then PATH.
- a relative path with a path component separator, the linker is found relative to the current working directory.
-fuse-ld= and --ld-path= can be composed, e.g. -fuse-ld=lld --ld-path=/usr/bin/ld.lld
The driver can base its linker option decision on the flavor -fuse-ld=, but it should not do fragile
flavor checking with --ld-path=.
Shouldn't this use -B paths? Why do we want to ignore them?