https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124547
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-03-17
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to [email protected] from comment #8)
> > --- Comment #6 from Andreas Schwab <[email protected]> ---
> > After
> >
> > # Collect target-machine-specific information.
> > . ${srcdir}/config.gcc || exit 1
> >
> > the ultimate wisdom for GNU ld should be $gnu_ld, not $gnu_ld_flag.
>
> I doubt that: what's the point of all the gas=yes/gnu_ld=yes guesswork
> in config.gcc when the value can be actually determined?
>
> # gas Set to yes or no depending on whether the target
> # system normally uses GNU as.
>
> # gnu_ld Set to yes or no depending on whether the target
> # system normally uses GNU ld.
>
> Instead, we should assume gas/gld unless explicitly overridden or
> determined as "no" in gcc/configure.ac.
>
> To avoid the trouble of users having to specifiy
> --with-gnu-as=no/--with-gnu-ld=no, systems with non-gas/gld compatible
> assemblers and linkers (Solaris, HP/UX, Darwin, probably a few more)
> should determine the "no" setting instead, as I'm now doing for Solaris
> as/ld.
>
> This gets rid of the confusion that assemblers and linkers that don't
> identify as GNU assembler/GNU ld, but are compatible (that vast
> majority, I believe, e.g. lld, gold, ...) will work without additional
> effort.
I agree, this sounds like the most reasonable approach. Just to say
that --with-ld=/usr/bin/lld --with-gnu-ld will not currently make us
assume lld is GNU compatible because we re-detect that as non-GNU.