aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-09-20 14:54:56 +0200
committerPetr Štetiar <ynezz@true.cz>2019-09-25 12:50:24 +0200
commit965f341aa9fdb6e07d509d02a6ca188af050292a (patch)
tree2b9cf2043cf64d6012c3a8a7aaceb076fce103a9 /Makefile
parent661e37ccea2eb11714daf927cbaa58a8b8ff09df (diff)
downloadupstream-965f341aa9fdb6e07d509d02a6ca188af050292a.tar.gz
upstream-965f341aa9fdb6e07d509d02a6ca188af050292a.tar.bz2
upstream-965f341aa9fdb6e07d509d02a6ca188af050292a.zip
build: fix host menu config targets using ncurses
On a recent Gentoo Linux installation, invoking `make menuconfig`, `make kernel_menuconfig` or `make kernel_nconfig` in the build system fails, whereas for example `make menuconfig` in the kernel tree alone works as expected. This is happening because STAGING_PREFIX is not defined when kernel's {menu,n}config target calls pkg-config from the toolchain/host and thus pkg-config returns an empty value, and the fallback values in the kernel config script are applied but those are off and the linking fails. Solution is to use system's pkg-config for all ncurses based menu config targets in order to provide proper compiler/linker flags. Ref: FS#2423 Cc: Thomas Albers <thomas.gameiro@gmail.com> Tested-by: Stijn Tintel <stijn@linux-ipv6.be> Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ab97eacc9d..65ee10a84b 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
world:
+DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
ifneq ($(OPENWRT_BUILD),1)