Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH 2/4] kernel-build.eclass: Build logic for dist-kernels
Date: Sat, 04 Jan 2020 23:41:47
Message-Id: CAJ0EP41GqOtcxKnL_FdSXrpMc-yk87TcuiWwvrd2D_Vc=V-rzA@mail.gmail.com
In Reply to: [gentoo-dev] [PATCH 2/4] kernel-build.eclass: Build logic for dist-kernels by "Michał Górny"
1 On Sat, Jan 4, 2020 at 4:24 PM Michał Górny <mgorny@g.o> wrote:
2 > +# @FUNCTION: kernel-build_src_configure
3 > +# @DESCRIPTION:
4 > +# Prepare the toolchain for building the kernel, get the default .config
5 > +# or restore savedconfig, and get build tree configured for modprep.
6 > +kernel-build_src_configure() {
7 > + debug-print-function ${FUNCNAME} "${@}"
8 > +
9 > + # force ld.bfd if we can find it easily
10 > + local LD="$(tc-getLD)"
11 > + if type -P "${LD}.bfd" &>/dev/null; then
12 > + LD+=.bfd
13 > + fi
14 > +
15 > + MAKEARGS=(
16 > + V=1
17 > +
18 > + HOSTCC="$(tc-getCC)"
19 > + HOSTCXX="$(tc-getCXX)"
20 > + HOSTCFLAGS="${CFLAGS}"
21 > + HOSTLDFLAGS="${LDFLAGS}"
22
23 I think the HOST variables should reference the CBUILD toolchain. Example below.
24
25 # Sets BUILD_CFLAGS and BUILD_LDFLAGS if not set in make.conf.
26 tc-export_build_env
27
28 HOSTCC="$(tc-getBUILD_CC)"
29 HOSTCXX="$(tc-getBUILD_CXX)"
30 HOSTCFLAGS="${BUILD_CFLAGS}"
31 HOSTLDFLAGS="${BUILD_LDFLAGS}"

Replies