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. 

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. 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.

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. But this one thing feels 
pretty innocuous to me, and it could also be made stricter by ensuring that we 
never *both* add the machine subdir *and* prefix the path --- i.e. at most 1 
target-disambiguating method is used at a time.

I now have some patches for this change I suppose I could also submit.

Cheers,

John

Reply via email to