public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: John Ericson <mail@johnericson.me>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>, gcc@gcc.gnu.org
Subject: Re: Re: Optional machine prefix for programs in for -B dirs,   match ing Clang
Date: Wed, 4 Aug 2021 14:48:33 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LSU.2.20.2108041439550.9238@wotan.suse.de> (raw)
In-Reply-To: <8bae6ba2-a4ad-4445-aeb9-e19ece045062@www.fastmail.com>

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.

  parent reply	other threads:[~2021-08-04 14:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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     ` Michael Matz [this message]
2021-08-04 18:04       ` Optional machine prefix for programs in for -B dirs, match ing Clang 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.2108041439550.9238@wotan.suse.de \
    --to=matz@suse.de \
    --cc=gcc@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=mail@johnericson.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).