summaryrefslogtreecommitdiffstats
path: root/package/pkg-kconfig.mk
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2015-08-22 19:53:13 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-08-25 12:59:21 +0200
commit1a91c82f8a8e2de1ab95794429dfa90b78d51670 (patch)
tree76ce67d83ae6a13f1b7e31f946c567c1635e10a4 /package/pkg-kconfig.mk
parent77397b1c72323b8019b94abba7ca03af1aee2c0f (diff)
downloadbuildroot-1a91c82f8a8e2de1ab95794429dfa90b78d51670.tar.gz
buildroot-1a91c82f8a8e2de1ab95794429dfa90b78d51670.zip
core/pkg-kconfig: fix configurators
Currently, the configurators are using $($(2)_MAKE_ENV), often derived from $(TARGE_MAKE_ENV), as the environment to be set when calling the various configurators. This means that our host tools are used first, most notably pkg-config (from host-pkgconf). However, this is inherently flawed. Our pkg-config, when set for the host, only searches .pc files in $(HOST_DIR) and never ever uses the ones from the host. For example, since we do not build a host-qt, our pkg-config would not find the host's QtCore.pc et al. Consequently, on some systems (but not on others?) most of the configurators fail to build, especially the latest kernel versions, as they have been starting to use pkg-config two years ago. Fix that by filtering-out sensible values out of the environment, but only when calling the configurators. [Thomas: rewrap comment to appropriate length.] Reported-by: Mauro Condarelli <mc5686@mclink.it> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Mauro Condarelli <mc5686@mclink.it> Tested-by: Mauro Condarelli <mc5686@mclink.it> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-kconfig.mk')
-rw-r--r--package/pkg-kconfig.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index 375607faf9..44c74a712a 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -96,6 +96,16 @@ $$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
endif
endif
+# For the configurators, we do want to use the system-provided host
+# tools, not the ones we build. This is particularly true for
+# pkg-config; if we use our pkg-config (from host-pkgconf), then it
+# would not look for the .pc from the host, but we do need them,
+# especially to find ncurses, GTK+, Qt (resp. for menuconfig and
+# nconfig, gconfig, xconfig).
+# So we simply remove our PATH and PKG_CONFIG_* variables.
+$(2)_CONFIGURATOR_MAKE_ENV = \
+ $$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV))
+
# Configuration editors (menuconfig, ...)
#
# We need to apply the configuration fixups right after a configuration
@@ -112,7 +122,7 @@ endif
#
$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_%
$$($(2)_DIR)/.kconfig_editor_%: $$($(2)_DIR)/.stamp_kconfig_fixup_done
- $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+ $$($(2)_CONFIGURATOR_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
$$($(2)_KCONFIG_OPTS) $$(*)
rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built}
rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed
OpenPOWER on IntegriCloud