Hello, On Wed, 4 Aug 2021, John Ericson wrote:
> > Doesn't GCC automatically look for those commands in the --prefix > > directory that you configure GCC with? Or is that only for native > > compilers? > > It will search only if --with-*=... was not passed, and it will never > prefix the query. So yes in practice for cross compilers people do the > --with-* Hmm, no? Because as you said ... > I think the solution is to stop making cross compilers rely on these > --with-flags to do the obvious things. Executables like `collect2` > hidden within a libexesubdir (libexec/gcc/<machine>/<version>) have no > need for prefixing, but the assembler and linker are very much > public-facing executables in their own right, and usually are prefixed. ... the 'as' and 'ld' executables should be simply found within the version and target specific GCC libexecsubdir, possibly by being symlinks to whatever you want. That's at least how my crosss are configured and installed, without any --with-{as,ld} options. > and no searching happens, and for native compilers no one > bothers and searching does happen. But to be a pedant strictly speaking > the behavior is independent of whether the compiler is host == target or > not. Ciao, Michael.