Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 04 Jan 2022 23:29:28
Message-Id: 1641338950.55f5c68c01e791c7339144aadc1f20802791551e.mpagano@gentoo
1 commit: 55f5c68c01e791c7339144aadc1f20802791551e
2 Author: Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
3 AuthorDate: Fri Nov 26 15:10:36 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 4 23:29:10 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55f5c68c
7
8 kernel-2.eclass: Respect portage toolchain variables
9
10 Starting with kernel>=v5.7 the build system can override the
11 tools vars by setting LLVM=1 [1], but older kernels still use
12 the default GNU tools, so to be able to use a full LLVM/Clang
13 build, CC & co should be set to their respective portage values.
14
15 [1] a0d1c951ef08 kbuild: support LLVM=1 to switch the default tools to Clang/LLVM
16
17 Co-authored-by: Manoj Gupta <manojgupta <AT> chromium.org>
18 Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
19 Closes: https://github.com/gentoo/gentoo/pull/23091
20 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
21
22 eclass/kernel-2.eclass | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
26 index adc1425bc2e2..865c43d3153b 100644
27 --- a/eclass/kernel-2.eclass
28 +++ b/eclass/kernel-2.eclass
29 @@ -692,7 +692,7 @@ env_setup_xmakeopts() {
30 elif type -p ${CHOST}-ar >/dev/null; then
31 xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-"
32 fi
33 - xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC)"
34 + xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC) LD=$(tc-getLD) AR=$(tc-getAR) NM=$(tc-getNM) NM=$(tc-getNM) OBOBJCOPY=$(tc-getOBJCOPY) READELF=$(tc-getREADELF) STRIP=$(tc-getSTRIP)"
35 export xmakeopts
36 }