Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: new function tc-ld-force-bfd()
Date: Thu, 21 Jan 2021 05:10:58
Message-Id: CAJ0EP404iRVgwPy5Qs3qViB2pDTKf8Kow+Q0+tLqgRSsDA9Ghw@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: new function tc-ld-force-bfd() by Manoj Gupta
1 On Wed, Jan 20, 2021 at 9:41 PM Manoj Gupta <manojgupta@××××××.com> wrote:
2 >
3 >
4 >
5 > On Wed, Jan 20, 2021 at 1:01 PM Theo Anderson <telans@××××××.de> wrote:
6 >>
7 >> Hello, please see the below patch to support disabling ld.lld like
8 >> ld.gold. This has not been split into a separate function
9 >> such as tc-ld-disable-lld(), as I do not believe there is a use case
10 >> where ld.gold is supported and ld.lld is not.
11 >>
12 >> Thanks.
13 >>
14 >> Pull-request: https://github.com/gentoo/gentoo/pull/19116
15 >>
16 >
17 > 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.
18 > 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.
19 > 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.
20 >
21 > My preference us to add 2 functions:
22 > tc-ld-force-bfd
23 > tc-ld-disable-lld
24 >
25 > And tc-ld-disable-gold should check if gold is the current linker. If not, only then force bfd.
26 >
27 > What do the maintainers think?
28
29 Please see bug 729510 for an example where gold and lld do not work,
30 but bfd does. That bug precipitated this change in the first place.
31
32 I don't think there are any cases where we want to disable lld without
33 disabling gold. Maybe it would suffice to un-deprecate
34 tc-ld-disable-gold and only have it call tc-ld-force-bfd if the
35 default linker is gold. I don't think a separate tc-ld-disable-lld
36 function is necessary at this time, and it could be easily added
37 later.

Replies

Subject Author
Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: new function tc-ld-force-bfd() Arfrever Frehtes Taifersar Arahesis <arfrever.fta@×××××.com>
Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: new function tc-ld-force-bfd() Theo Anderson <telans@××××××.de>