aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-11-11 21:37:45 +0100
committerPetr Štetiar <ynezz@true.cz>2019-11-14 22:53:31 +0100
commitf962e021d48fc2cc4e9e884e3639b5046cec9c2c (patch)
treee9590ee23522c628ae5048c14cc988960baddfb9
parent6990510aca41074351f92a5abc6f4afb4b606506 (diff)
downloadupstream-f962e021d48fc2cc4e9e884e3639b5046cec9c2c.tar.gz
upstream-f962e021d48fc2cc4e9e884e3639b5046cec9c2c.tar.bz2
upstream-f962e021d48fc2cc4e9e884e3639b5046cec9c2c.zip
kernel-build: fix kernel_menuconfig breakage by forcing YACC
Commit 965f341aa9fd ("build: fix host menu config targets using ncurses") has moved host's path with pkg-config (usually /usr/bin) at the first place in PATH variable, which is now causing issues with bison as BISON_PKGDATADIR points into STAGING_DIR_HOST, but the actual bison used is the one under host PATH (usually /usr/bin/bison), leading to the following strange failures: $ make target/linux/clean kernel_menuconfig V=sc export MAKEFLAGS= ;make -C /somewhere/linux-4.19.81 menuconfig make -f ./scripts/Makefile.build obj=scripts/kconfig menuconfig ... bison -oscripts/kconfig/zconf.tab.c -t -l scripts/kconfig/zconf.y staging_dir/host/bin/m4: cannot open `staging_dir/host/share/bison/bison.m4': No such file or directory staging_dir/host/bin/m4: cannot open `staging_dir/host/share/bison/c-skel.m4': No such file or directory ... gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d <...snip...> -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c gcc: error: scripts/kconfig/zconf.tab.c: No such file or directory gcc: fatal error: no input files Fix this by forcing usage of bison under STAGING_DIR_HOST/bin via YACC make variable. Cc: Thomas Albers <thomas.gameiro@gmail.com> Cc: Stijn Tintel <stijn@linux-ipv6.be> Cc: Eneas U de Queiroz <cotequeiroz@gmail.com> Tested-by: Ivan Revyakin <LovingFox@GMail.com> Tested-by: Thomas Albers <thomas.gameiro@googlemail.com> Ref: https://forum.openwrt.org/t/bpi-r64-kernel-4-19-kernel-menuconfig-error Fixes: 965f341aa9fd ("build: fix host menu config targets using ncurses") Signed-off-by: Petr Štetiar <ynezz@true.cz>
-rw-r--r--include/kernel-build.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 3fdf7efc52..684fbd34d3 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -163,6 +163,7 @@ define BuildKernel
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
$(_SINGLE)$(KERNEL_MAKE) \
$(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
+ YACC=$(STAGING_DIR_HOST)/bin/bison \
$$@
$(LINUX_RECONF_DIFF) $(LINUX_DIR)/.config > $(LINUX_RECONFIG_TARGET)