From ba14020f85e6923c0c983ba1a916d0931f11541e Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sat, 31 Dec 2022 22:08:16 +0100 Subject: [PATCH] kernel: Force disable LLVM CUDA The kernel tries to define the LINUX_COMPILER macro from the output of `$(CC) -v | grep ' version '`, but in clang that might produce more than one line containing ' version ' when CUDA is installed: ``` Android (8490178, based on r450784d) clang version 14.0.6 Found CUDA installation: /usr/local/cuda, version 11.0 ``` That causes the macro to expand into multiple lines, upsetting the compiler that cannot find the ending double quote. In upstream linux this is fixed from v5.8 Change-Id: Icde4253e989df1cbbefc0ce98f437d16822fc93b --- build/tasks/kernel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index 2409894a..40285e5a 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -239,7 +239,7 @@ ifneq ($(TARGET_KERNEL_CLANG_COMPILE),false) endif PATH_OVERRIDE += PATH=$(TARGET_KERNEL_CLANG_PATH)/bin:$$PATH ifeq ($(KERNEL_CC),) - KERNEL_CC := CC="$(CCACHE_BIN) clang" + KERNEL_CC := CC="$(CCACHE_BIN) clang --cuda-path=/dev/null" endif endif