From 938b3496cbe5a2ecde2e508a924de62fbc677221 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Fri, 27 Apr 2018 14:01:50 +0800 Subject: [PATCH] kernel.mk: fix bison unable to find m4 file issue Android builds a version of bison which is unusable outside the tree. Since the bison is invoked in the KBUILD_OUTPUT dir, the error is generated: bison: external/bison/data/m4sugar/m4sugar.m4: cannot open: No such file or directory To workaround it, add a symlink to the external dir so that bison can get the expected m4 file. --- build/tasks/kernel.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index cb9b22d..da84163 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -45,6 +45,7 @@ KERNEL_DOTCONFIG_FILE := $(KBUILD_OUTPUT)/.config KERNEL_ARCH_CHANGED := $(if $(filter 0,$(shell grep -s ^$(if $(filter x86,$(TARGET_KERNEL_ARCH)),\#.)CONFIG_64BIT $(KERNEL_DOTCONFIG_FILE) | wc -l)),FORCE) $(KERNEL_DOTCONFIG_FILE): $(KERNEL_CONFIG_FILE) $(wildcard $(TARGET_KERNEL_DIFFCONFIG)) $(KERNEL_ARCH_CHANGED) $(hide) mkdir -p $(@D) && cat $(wildcard $^) > $@ + $(hide) ln -sf ../../../../../../external $(@D) $(mk_kernel) oldnoconfig # bison is needed to build kernel and external modules from source -- 2.11.0