diff options
authorArnout Vandecappelle (Essensium/Mind) <>2018-05-17 12:39:21 (GMT)
committerThomas Petazzoni <>2018-05-17 18:54:10 (GMT)
commit6d3d09e23213e88c14f2ddc883700499315a41bc (patch)
parent31e4328728dd78f4df7499d5e310be597a759907 (diff)
linux: don't override HOSTCC for kconfig
Kconfig uses either pkg-config or hard-coded /usr/include paths to find the ncurses or ncursesw library. If ncursesw is found, it will include <ncursesw.h>. Since Buildroot's host-ncurses doesn't install a .pc file, and anyway doesn't pass the pkg-config options to find the host pkg-config files, Kconfig will always find the system's ncursesw.h. However, since commit dde090c299 (linux: fix passing of host CFLAGS and LDFLAGS) HOST_LDFLAGS is passed to the linux build system. Thus, if host-ncurses was already built before 'make linux-menuconfig' is called, the build will pick up libncurses from the host directory, which is NOT widechar. Thus, two different ncurses configurations are mixed into the final mconf program. This will result in serious breakage in the rendering of the menus (lots of @ and question mark characters). As a workaround (suggested by Yann), don't pass HOST_CFLAGS and HOST_LDFLAGS when running kconfig commands. For kconfig, we should never need host packages anyway. This way, the kconfig calls will always use the system's ncurses and never our host-ncurses. Note that the same problem could pop up for other kconfig packages as well if we ever pass HOST_CFLAGS/HOST_LDFLAGS to them. We could force HOSTCC=$(HOSTCC) directly in kconfig-package. However, for now there are no other packages that exhibit this problem, so this can be revisited when they do. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <> Cc: David De Grave <> Cc: Scott Fan <> Cc: Yann E. MORIN <> Tested-by: Matt Weber <> Signed-off-by: Thomas Petazzoni <>
1 files changed, 8 insertions, 1 deletions
diff --git a/linux/ b/linux/
index b6b9139..6b5f534 100644
--- a/linux/
+++ b/linux/
@@ -235,7 +235,14 @@ LINUX_KCONFIG_FILE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE))
LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
+# LINUX_MAKE_FLAGS overrides HOSTCC to allow the kernel build to find our
+# host-openssl and host-libelf. However, this triggers a bug in the kconfig
+# build script that causes it to build with /usr/include/ncurses.h (which is
+# typically wchar) but link with $(HOST_DIR)/lib/ (which is not).
+# We don't actually need any host-package for kconfig, so remove the HOSTCC
+# override again.
# If no package has yet set it, set it from the Kconfig option