1 |
On Mon, Jan 6, 2020 at 12:54 PM Michał Górny <mgorny@g.o> wrote: |
2 |
> |
3 |
> On Mon, 2020-01-06 at 12:43 -0500, Mike Gilbert wrote: |
4 |
> > On Sun, Jan 5, 2020 at 1:27 AM Michał Górny <mgorny@g.o> wrote: |
5 |
> > > +# @FUNCTION: kernel-build_src_configure |
6 |
> > > +# @DESCRIPTION: |
7 |
> > > +# Prepare the toolchain for building the kernel, get the default .config |
8 |
> > > +# or restore savedconfig, and get build tree configured for modprep. |
9 |
> > > +kernel-build_src_configure() { |
10 |
> > > + debug-print-function ${FUNCNAME} "${@}" |
11 |
> > > + |
12 |
> > > + # force ld.bfd if we can find it easily |
13 |
> > > + local LD="$(tc-getLD)" |
14 |
> > > + if type -P "${LD}.bfd" &>/dev/null; then |
15 |
> > > + LD+=.bfd |
16 |
> > > + fi |
17 |
> > |
18 |
> > Is there some reason not to use the tc-ld-disable-gold function? |
19 |
> > |
20 |
> |
21 |
> Yes. As the name says, it covers gold usage only and not lld. |
22 |
|
23 |
It might be a good idea to copy this logic to handle multi-word LD values. |
24 |
|
25 |
https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/toolchain-funcs.eclass#n498 |
26 |
|
27 |
Or, a nicer alternative would be to refactor tc-ld-disable-gold into 2 |
28 |
functions: move most of the logic into a new function |
29 |
"tc-ld-force-bfd", and update tc-ld-disable-gold to call the former if |
30 |
tc-ld-is-gold is true. I can write a patch for that if you agree. |