diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index eff458c..73fa84c 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -21,6 +21,7 @@ # # These config vars are usually set in BoardConfig.mk: # +# TARGET_KERNEL_ADDITIONAL_FLAGS = Additional make flags, optional # TARGET_KERNEL_CONFIG = List of kernel defconfigs, first one being the base one, # while all the others are fragments that will be merged # to main one in .config. @@ -255,6 +256,10 @@ ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTB KERNEL_MAKE_FLAGS += DTC_EXT=$(KERNEL_BUILD_OUT_PREFIX)$(DTC) endif +ifneq ($(TARGET_KERNEL_ADDITIONAL_FLAGS),) + KERNEL_MAKE_FLAGS += $(TARGET_KERNEL_ADDITIONAL_FLAGS) +endif + # Internal implementation of make-kernel-target # $(1): output path (The value passed to O=) # $(2): target to build (eg. defconfig, modules, dtbo.img) diff --git a/config/BoardConfigKernel.mk b/config/BoardConfigKernel.mk index 51edaa2..528ae33 100644 --- a/config/BoardConfigKernel.mk +++ b/config/BoardConfigKernel.mk @@ -135,10 +135,6 @@ else KERNEL_MAKE_FLAGS += CPATH="/usr/include:/usr/include/x86_64-linux-gnu" HOSTCFLAGS="-fuse-ld=lld" HOSTLDFLAGS="-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld" endif -ifneq ($(TARGET_KERNEL_ADDITIONAL_FLAGS),) - KERNEL_MAKE_FLAGS += $(TARGET_KERNEL_ADDITIONAL_FLAGS) -endif - TOOLS_PATH_OVERRIDE := \ LD_LIBRARY_PATH=$(BUILD_TOP)/prebuilts/tools-lineage/$(HOST_PREBUILT_TAG)/lib:$$LD_LIBRARY_PATH \ PERL5LIB=$(BUILD_TOP)/prebuilts/tools-lineage/common/perl-base