* [gentoo-dev] [PATCH v2] kernel-2.eclass: Respect portage CC & AR variables
@ 2021-12-15 14:58 99% Adrian Ratiu
0 siblings, 0 replies; 1+ results
From: Adrian Ratiu @ 2021-12-15 14:58 UTC (permalink / raw
To: gentoo-dev; +Cc: Manoj Gupta
Starting with kernel>=v5.7 the build system can override the
tools vars by setting LLVM=1 [1], but older kernels still use
the default GNU tools, so to be able to use a full LLVM/Clang
build, CC should be set together with AR to the portage set
values.
Doing this avoids situations like building the kernel with
clang (using the set HOSTCC) but using gcc/gnu-ar for headers.
[1] a0d1c951ef08 kbuild: support LLVM=1 to switch the default tools to Clang/LLVM
Co-authored-by: Manoj Gupta <manojgupta@chromium.org>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
---
eclass/kernel-2.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index adc1425bc2e..caeec86ff59 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -692,7 +692,7 @@ env_setup_xmakeopts() {
elif type -p ${CHOST}-ar >/dev/null; then
xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-"
fi
- xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC)"
+ xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC) AR=$(tc-getAR)"
export xmakeopts
}
--
2.34.1
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-12-15 14:58 99% [gentoo-dev] [PATCH v2] kernel-2.eclass: Respect portage CC & AR variables Adrian Ratiu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox