Skip to contentSkip to conversation

uboot: don't override HOSTCC/HOSTLDFLAGS for kconfig

PATCH New Peter Korsgaard 2 participants 4 messages Jun 24, 2018 – Jul 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uboot: don't override HOSTCC/HOSTLDFLAGS for kconfig

So the host ncurses includes and library are used instead of a mix of both, causing corrupted characters. Similar to the linux fix in commit 6d3d09e23213e8 (linux: don't override HOSTCC for kconfig), except that we pass the linker flags in HOSTLDFLAGS.

---
 boot/uboot/uboot.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +9 -1
index 03bd7ea743..6ef275e842 100644
@@ -211,7 +211,15 @@ endif # BR2_TARGET_UBOOT_USE_DEFCONFIG
 
 UBOOT_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES))
 UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
-UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS)
+
+# UBOOT_MAKE_OPTS overrides HOSTCC / HOSTLDFLAGS to allow the build to
+# find our host-openssl. 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/libncurses.so (which is not).  We don't actually
+# need any host-package for kconfig, so remove the HOSTCC/HOSTLDFLAGS
+# override again.
+UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) HOSTCC="$(HOSTCC)" HOSTLDFLAGS=""
 define UBOOT_HELP_CMDS
 	@echo '  uboot-menuconfig       - Run U-Boot menuconfig'
 	@echo '  uboot-savedefconfig    - Run U-Boot savedefconfig'
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 uboot: don't override HOSTCC/HOSTLDFLAGS for kconfig

Quoted 6 lines · Peter Korsgaard

So the host ncurses includes and library are used instead of a mix of both, causing corrupted characters. Similar to the linux fix in commit 6d3d09e23213e8 (linux: don't override HOSTCC for kconfig), except that we pass the linker flags in HOSTLDFLAGS.

#2 lore raw

PATCH 1/1 uboot: don't override HOSTCC/HOSTLDFLAGS for kconfig

In reply to Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

So the host ncurses includes and library are used instead of a mix of both, causing corrupted characters. Similar to the linux fix in commit 6d3d09e23213e8 (linux: don't override HOSTCC for kconfig), except that we pass the linker flags in HOSTLDFLAGS.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 uboot: don't override HOSTCC/HOSTLDFLAGS for kconfig

In reply to Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

So the host ncurses includes and library are used instead of a mix of both, causing corrupted characters. Similar to the linux fix in commit 6d3d09e23213e8 (linux: don't override HOSTCC for kconfig), except that we pass the linker flags in HOSTLDFLAGS.

Committed to 2018.02.x and 2018.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard