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: Optional machine prefix for programs in for -B dirs, match ing Clang
Date: Thu, 5 Aug 2021 12:30:35 +0000 (UTC) [thread overview]
Message-ID: <alpine.LSU.2.20.2108051222570.12564@wotan.suse.de> (raw)
In-Reply-To: <fa975a71-2a90-4831-af50-87ecd2643fa0@www.fastmail.com>
Hello,
On Wed, 4 Aug 2021, John Ericson wrote:
> On Wed, Aug 4, 2021, at 10:48 AM, Michael Matz wrote:
> > ... 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.
>
> Yes that does work, and that's probably the best option today. I'm just
> a little wary of unprefixing things programmatically.
The libexecsubdir _is_ the prefix in above case :)
> For some context, this is NixOS where we assemble a ton of cross
> compilers automatically and each package gets its own isolated many FHS.
> For that reason I would like to eventually avoid the target-specific
> subdirs entirely, as I have the separate package trees to disambiguate
> things. Now, I know that exact same argument could also be used to say
> target prefixing is also superfluous, but eventually things on the PATH
> need to be disambiguated.
Sure, which is why (e.g.) cross binutils do install with an arch prefix
into ${bindir}. But as GCC has the capability to look into libexecsubdir
for binaries as well (which quite surely should never be in $PATH on any
system), I don't see the conflict.
> There is no requirement that the libexec things be named like the bin
> things, but I sort of feel it's one less thing to remember and makes
> debugging easier.
Well, the naming scheme of binaries in libexecsubdir reflects the scheme
that the compilers are using: cc1, cc1plus etc. Not
aarch64-unknown-linux-cc1.
> I am sympathetic to the issue that if GCC accepts everything Clang does
> and vice-versa, we'll Postel's-law ourselves ourselves over time into
> madness as mistakes are accumulated rather than weeded out.
Right. I supposed it wouldn't hurt to also look for "${targettriple}-as"
in $PATH before looking for 'as' (in $PATH). But I don't think we can (or
should) switch off looking for 'as' in libexecsubdir. I don't even see
why that behaviour should depend on an option, it could just be added by
default.
> I now have some patches for this change I suppose I could also submit.
Even better :)
Ciao,
Michael.
next prev parent reply other threads:[~2021-08-05 12:30 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 ` 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 [this message]
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.2108051222570.12564@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).