On Thu, 21 Jan 2021 00:10:36 -0500
Mike Gilbert <flop...@gentoo.org> wrote:

> On Wed, Jan 20, 2021 at 9:41 PM Manoj Gupta <manojgu...@google.com>
> wrote:
> >
> >
> >
> > On Wed, Jan 20, 2021 at 1:01 PM Theo Anderson <tel...@posteo.de>
> > wrote:  
> >>
> >> Hello, please see the below patch to support disabling ld.lld like
> >> ld.gold. This has not been split into a separate function
> >> such as tc-ld-disable-lld(), as I do not believe there is a use
> >> case where ld.gold is supported and ld.lld is not.
> >>
> >> Thanks.
> >>
> >> Pull-request: https://github.com/gentoo/gentoo/pull/19116
> >>  
> >
> > I am not a Gentoo maintainer but this forces bfd linker for the
> > ebuilds when gold is not even used e.g. lld is default linker. I am
> > curious how many places where gold is disabled do not work with
> > lld. In my experience, LLD is far more compatible with bfd than
> > gold e.g. it can link Linux kernels. So, imo we should not disable
> > lld as a side effect when the compatibility problem is with gold
> > only. i.e. It is ok to add a function to force bfd but disabling
> > gold needs to have a check if gold is the current linker.
> >
> > My preference us to add 2 functions:
> > tc-ld-force-bfd
> > tc-ld-disable-lld
> >
> > And tc-ld-disable-gold should check if gold is the current linker.
> > If not, only then force bfd.
> >
> > What do the maintainers think?  
> 
> Please see bug 729510 for an example where gold and lld do not work,
> but bfd does. That bug precipitated this change in the first place.
> 
> I don't think there are any cases where we want to disable lld without
> disabling gold. Maybe it would suffice to un-deprecate
> tc-ld-disable-gold and only have it call tc-ld-force-bfd if the
> default linker is gold. I don't think a separate tc-ld-disable-lld
> function is necessary at this time, and it could be easily added
> later.
> 

This is probably the solution to go for at the moment. I will update the
patch and post a v2. Regarding a new function such as tc-set-linker as
mentioned by Afrever, a complete overhaul like that would be better
suited as a separate patch.

Reply via email to