Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH v2 2/4] kernel-build.eclass: Build logic for dist-kernels
Date: Mon, 06 Jan 2020 18:13:59
Message-Id: 760bc1e5f08a133ae661fadcb5f46e7e68ac3754.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH v2 2/4] kernel-build.eclass: Build logic for dist-kernels by Mike Gilbert
1 On Mon, 2020-01-06 at 13:07 -0500, Mike Gilbert wrote:
2 > On Mon, Jan 6, 2020 at 12:54 PM Michał Górny <mgorny@g.o> wrote:
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.
31 >
32
33 Sure, that sounds like a good idea. Please also replace which(1) with
34 'type' while at it.
35
36 --
37 Best regards,
38 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature