diff options
author | Alexander Koskovich <zvnexus@outlook.com> | 2021-06-05 15:58:06 -0700 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-01-13 16:38:27 +0800 |
commit | f02b356a87e72c66686ddb88919a1e526c12c8eb (patch) | |
tree | 2a2f757f4ba3be915c269c43668cb1d6c4f0b7f6 | |
parent | e6e64713120a164c7153f603eef1cf7a181446be (diff) |
kernel/build: Fix path overrides.
* GKI/QGKI now succeed in building their defconfigs
from the fragments.
Change-Id: I35ad362313cee5b8bcb34c3e1ca76410204b2b95
-rw-r--r-- | kernel_definitions.mk | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel_definitions.mk b/kernel_definitions.mk index e12531f..3c23aad 100644 --- a/kernel_definitions.mk +++ b/kernel_definitions.mk @@ -39,13 +39,15 @@ TARGET_KERNEL_MAKE_ENV += HOSTCC=$(SOURCE_ROOT)/$(SOONG_LLVM_PREBUILTS_PATH)/cla TARGET_KERNEL_MAKE_ENV += HOSTAR=$(SOURCE_ROOT)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-ar TARGET_KERNEL_MAKE_ENV += HOSTLD=$(SOURCE_ROOT)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-ld TARGET_KERNEL_MAKE_CFLAGS = "-I/usr/include -I/usr/include/x86_64-linux-gnu -L/usr/lib -L/usr/lib/x86_64-linux-gnu -fuse-ld=lld" -TARGET_KERNEL_MAKE_ENV += BISON_PKGDATADIR=$(SOURCE_ROOT)/prebuilts/build-tools/common/bison -TARGET_KERNEL_MAKE_ENV += DEPMOD=$(SOURCE_ROOT)/$(HOST_OUT_EXECUTABLES)/depmod -TARGET_KERNEL_MAKE_ENV += YACC=$(SOURCE_ROOT)/prebuilts/build-tools/linux-x86/bin/bison -TARGET_KERNEL_MAKE_ENV += LEX=$(SOURCE_ROOT)/prebuilts/build-tools/linux-x86/bin/flex -TARGET_KERNEL_MAKE_ENV += M4=$(SOURCE_ROOT)/prebuilts/build-tools/$(HOST_OS)-x86/bin/m4 TARGET_KERNEL_MAKE_LDFLAGS = "-L/usr/lib -L/usr/lib/x86_64-linux-gnu -fuse-ld=lld" +# Host tools shouldn't be used when prebuilts for the binary exist, for more information +# see https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools. +TARGET_KERNEL_MAKE_ENV += DEPMOD=$(SOURCE_ROOT)/$(HOST_OUT_EXECUTABLES)/depmod +TARGET_KERNEL_MAKE_ENV += LEX=$(SOURCE_ROOT)/prebuilts/build-tools/$(HOST_OS)-$(HOST_2ND_ARCH)/bin/flex +TARGET_KERNEL_MAKE_ENV += M4=$(SOURCE_ROOT)/prebuilts/build-tools/$(HOST_OS)-$(HOST_2ND_ARCH)/bin/m4 +TARGET_KERNEL_MAKE_ENV += YACC=$(SOURCE_ROOT)/prebuilts/build-tools/$(HOST_OS)-$(HOST_2ND_ARCH)/bin/bison + BUILD_CONFIG := $(TARGET_KERNEL_SOURCE)/build.config.common CLANG_VERSION := $(shell IFS="/"; while read LINE; do if [[ $$LINE == *"CLANG_PREBUILT_BIN"* ]]; then read -ra CLANG <<< "$$LINE"; for VERSION in "$${CLANG[@]}"; do if [[ $$VERSION == *"clang-"* ]]; then echo "$$VERSION"; fi; done; fi; done < $(BUILD_CONFIG)) KERNEL_LLVM_BIN := $(lastword $(sort $(wildcard $(SOURCE_ROOT)/$(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/clang-4*)))/bin/clang |