On 6/3/24 3:47 PM, Nathan Chancellor wrote:
On Mon, Jun 03, 2024 at 04:32:30PM +0100, Mark Brown wrote:
On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote:
The kselftests may be built in a couple different ways: make LLVM=1 make CC=clang
In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of lib.mk, and any Makefiles that include lib.mk, can base decisions solely on whether or not LLVM is set.
ICBW but I believe there are still some architectures with clang but not lld support where there's a use case for using CC=clang.
Does CC=clang even work for the selftests? lib.mk here uses 'CC :=' so won't CC=clang get overridden to CC=$(CROSS_COMPILE)gcc?
I received a report that someone (I forget who or what) was definitely attempting to just set CC=clang. But yes, it definitely doesn't work properly for CROSS_COMPILE.
And the more we talk it through, the less I like this direction that I went off on. Let's just drop this patch and instead consider moving kselftest builds closer to kbuild, instead of making it more different.
thanks,