public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Optional machine prefix for programs in for -B dirs, matching Clang
@ 2021-08-04  7:25 John Ericson
  2021-08-04  7:32 ` Jonathan Wakely
  0 siblings, 1 reply; 9+ messages in thread
From: John Ericson @ 2021-08-04  7:25 UTC (permalink / raw)
  To: gcc

Problem:

It's somewhat annoying to have to tell GCC --with-as=... --with-ld=... just to prefix those commands the same way GCC is prefixed.

In particular, when doing host-only build (skipping all target libraries), one otherwise doesn't need the target-specific binutils to be yet built, but --with-as and --with-ld will complain if the referenced exes cannot be found. This might sound esoteric, but as someone that spends a lot of time optimizing bootstrap dependency graphs for incrementality / parallelism, it is quite a real-world annoyance.

Solution:

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.

Per [1], Clang does in fact look up prefixed exes against -B across the board. Making GCC look up exes that same way seems like a fine solution too.

What do you all think?

John 

[1]: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-b-prefix

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-06  4:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04  7:25 Optional machine prefix for programs in for -B dirs, matching Clang John Ericson
2021-08-04  7:32 ` Jonathan Wakely
2021-08-04  7:40   ` John Ericson
2021-08-04  9:04     ` Jonathan Wakely
2021-08-04 14:48     ` Re: Optional machine prefix for programs in for -B dirs, match ing Clang Michael Matz
2021-08-04 18:04       ` John Ericson
2021-08-05 12:30         ` Michael Matz
2021-08-06  4:13           ` John Ericson
2021-08-04 13:05   ` Optional machine prefix for programs in for -B dirs, matching Clang Paul Koning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).