summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Weinstein <jake@aospa.co>2020-10-06 04:43:57 +0200
committeralk3pInjection <webmaster@raspii.tech>2022-01-13 16:38:27 +0800
commit63901b118b1bf8bd37f14db4c6e649043b7b31ae (patch)
treea7818fe58726f3b5e89f77f13978579997b71846
parent47e0e77a174046391875bb31b8d6c3bbe6b430f6 (diff)
kernelscripts: define CC variable.
* CAF's script expects this kernel commit to be present: "scripts: gcc-wrapper: Use wrapper to check compiler warnings". In some cases, it is reverted or not present, which causes compile to try to use GCC 4.9 unsuccessfully without this commit. * Since we build with -Werror anyway, this commit is safe because gcc-wrapper is redundant. Google also reverts the same CAF commit. * Vishalcj17 : Adapt for lahaina scripts. Change-Id: Ie172be870737b7960eb3fc595f51e31e753992ed
-rw-r--r--kernel_definitions.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel_definitions.mk b/kernel_definitions.mk
index 5764c12..68a8285 100644
--- a/kernel_definitions.mk
+++ b/kernel_definitions.mk
@@ -98,6 +98,7 @@ else
CLANG_ARCH := arm-linux-gnueabi
endif
+cc :=
real_cc :=
ifeq ($(KERNEL_LLVM_SUPPORT),true)
ifeq ($(KERNEL_SD_LLVM_SUPPORT), true) #Using sd-llvm compiler
@@ -107,6 +108,7 @@ ifeq ($(KERNEL_LLVM_SUPPORT),true)
KERNEL_LLVM_BIN := $(shell pwd)/$(SDCLANG_PATH)/clang
endif
$(warning "Using sdllvm" $(KERNEL_LLVM_BIN))
+ cc := CC=$(KERNEL_LLVM_BIN) CLANG_TRIPLE=aarch64-linux-gnu-
real_cc := REAL_CC=$(KERNEL_LLVM_BIN) CLANG_TRIPLE=aarch64-linux-gnu-
else
ifeq ($(USE_KERNEL_AOSP_LLVM), true) #Using kernel aosp-llvm compiler
@@ -117,7 +119,8 @@ ifeq ($(KERNEL_LLVM_SUPPORT),true)
KERNEL_AOSP_LLVM_BIN := $(shell pwd)/$(shell (dirname $(CLANG)))
$(warning "Not using latest aosp-llvm" $(KERNEL_LLVM_BIN))
endif
- real_cc := REAL_CC=$(KERNEL_LLVM_BIN) CLANG_TRIPLE=$(CLANG_ARCH) AR=$(KERNEL_AOSP_LLVM_BIN)/llvm-ar LLVM_NM=$(KERNEL_AOSP_LLVM_BIN)/llvm-nm LD=$(KERNEL_AOSP_LLVM_BIN)/ld.lld NM=$(KERNEL_AOSP_LLVM_BIN)/llvm-nm
+ cc := CC=$(KERNEL_LLVM_BIN) CLANG_TRIPLE=aarch64-linux-gnu- AR=$(KERNEL_AOSP_LLVM_BIN)/llvm-ar LLVM_NM=$(KERNEL_AOSP_LLVM_BIN)/llvm-nm LD=$(KERNEL_AOSP_LLVM_BIN)/ld.lld NM=$(KERNEL_AOSP_LLVM_BIN)/llvm-nm
+ real_cc := REAL_CC=$(KERNEL_LLVM_BIN) CLANG_TRIPLE=aarch64-linux-gnu- AR=$(KERNEL_AOSP_LLVM_BIN)/llvm-ar LLVM_NM=$(KERNEL_AOSP_LLVM_BIN)/llvm-nm LD=$(KERNEL_AOSP_LLVM_BIN)/ld.lld NM=$(KERNEL_AOSP_LLVM_BIN)/llvm-nm
endif
else
ifeq ($(strip $(KERNEL_GCC_NOANDROID_CHK)),0)
@@ -284,6 +287,7 @@ define build-kernel
DTS_VENDOR=$(TARGET_DTS_VENDOR) \
MODULES=$(TARGET_HAS_MODULES) \
device/qcom/kernelscripts/buildkernel.sh \
+ $(cc) \
$(real_cc) \
$(TARGET_KERNEL_MAKE_ENV)
endef