1 |
On Thu, 21 Jan 2021 00:10:36 -0500 |
2 |
Mike Gilbert <floppym@g.o> wrote: |
3 |
|
4 |
> On Wed, Jan 20, 2021 at 9:41 PM Manoj Gupta <manojgupta@××××××.com> |
5 |
> wrote: |
6 |
> > |
7 |
> > |
8 |
> > |
9 |
> > On Wed, Jan 20, 2021 at 1:01 PM Theo Anderson <telans@××××××.de> |
10 |
> > wrote: |
11 |
> >> |
12 |
> >> Hello, please see the below patch to support disabling ld.lld like |
13 |
> >> ld.gold. This has not been split into a separate function |
14 |
> >> such as tc-ld-disable-lld(), as I do not believe there is a use |
15 |
> >> case where ld.gold is supported and ld.lld is not. |
16 |
> >> |
17 |
> >> Thanks. |
18 |
> >> |
19 |
> >> Pull-request: https://github.com/gentoo/gentoo/pull/19116 |
20 |
> >> |
21 |
> > |
22 |
> > I am not a Gentoo maintainer but this forces bfd linker for the |
23 |
> > ebuilds when gold is not even used e.g. lld is default linker. I am |
24 |
> > curious how many places where gold is disabled do not work with |
25 |
> > lld. In my experience, LLD is far more compatible with bfd than |
26 |
> > gold e.g. it can link Linux kernels. So, imo we should not disable |
27 |
> > lld as a side effect when the compatibility problem is with gold |
28 |
> > only. i.e. It is ok to add a function to force bfd but disabling |
29 |
> > gold needs to have a check if gold is the current linker. |
30 |
> > |
31 |
> > My preference us to add 2 functions: |
32 |
> > tc-ld-force-bfd |
33 |
> > tc-ld-disable-lld |
34 |
> > |
35 |
> > And tc-ld-disable-gold should check if gold is the current linker. |
36 |
> > If not, only then force bfd. |
37 |
> > |
38 |
> > What do the maintainers think? |
39 |
> |
40 |
> Please see bug 729510 for an example where gold and lld do not work, |
41 |
> but bfd does. That bug precipitated this change in the first place. |
42 |
> |
43 |
> I don't think there are any cases where we want to disable lld without |
44 |
> disabling gold. Maybe it would suffice to un-deprecate |
45 |
> tc-ld-disable-gold and only have it call tc-ld-force-bfd if the |
46 |
> default linker is gold. I don't think a separate tc-ld-disable-lld |
47 |
> function is necessary at this time, and it could be easily added |
48 |
> later. |
49 |
> |
50 |
|
51 |
This is probably the solution to go for at the moment. I will update the |
52 |
patch and post a v2. Regarding a new function such as tc-set-linker as |
53 |
mentioned by Afrever, a complete overhaul like that would be better |
54 |
suited as a separate patch. |