1 |
Starting with kernel >= v5.7 the build system can override this |
2 |
variable by passing LLVM=1 [1], but for older kernels or in |
3 |
cases where the LLVM toolchain is setup directly via portage, |
4 |
CC should be respected to avoid situations like building the |
5 |
kernel with clang but the headers with gcc. |
6 |
|
7 |
[1] a0d1c951ef08 kbuild: support LLVM=1 to switch the default tools to Clang/LLVM |
8 |
|
9 |
Co-authored-by: Manoj Gupta <manojgupta@××××××××.org> |
10 |
Signed-off-by: Adrian Ratiu <adrian.ratiu@×××××××××.com> |
11 |
--- |
12 |
eclass/kernel-2.eclass | 2 +- |
13 |
1 file changed, 1 insertion(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass |
16 |
index adc1425bc2e..9a7d96d26c7 100644 |
17 |
--- a/eclass/kernel-2.eclass |
18 |
+++ b/eclass/kernel-2.eclass |
19 |
@@ -692,7 +692,7 @@ env_setup_xmakeopts() { |
20 |
elif type -p ${CHOST}-ar >/dev/null; then |
21 |
xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-" |
22 |
fi |
23 |
- xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC)" |
24 |
+ xmakeopts="${xmakeopts} HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC)" |
25 |
export xmakeopts |
26 |
} |
27 |
|
28 |
-- |
29 |
2.34.0 |