kernel-2.eclass: Respect portage toolchain variables

This backports the following commit from Gentoo upstream:

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 & co should be set to their respective portage values.

[1] a0d1c951ef08 kbuild: support LLVM=1 to switch the default tools to Clang/LLVM

TEST=Local builds on x64 & arm; CQ.

Change-Id: Ie99ae59fc9686f45cbf2f52249510e780fe61b33
Reviewed-by: Mike Frysinger <>
Tested-by: Manoj Gupta <>
Tested-by: Adrian Ratiu <>
Commit-Queue: Adrian Ratiu <>
1 file changed