aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-06-07 18:14:27 +0200
committerFelix Fietkau <nbd@nbd.name>2017-06-07 18:31:10 +0200
commitfec38ebf0d0ffba22937e181941cea7d9cddf808 (patch)
tree86cfb97f1c89ec88b0b95d118626b5493ab691c3
parentc6c1f6a5480b12c938ae4154a55a08a559e8e46b (diff)
downloadupstream-fec38ebf0d0ffba22937e181941cea7d9cddf808.tar.gz
upstream-fec38ebf0d0ffba22937e181941cea7d9cddf808.tar.bz2
upstream-fec38ebf0d0ffba22937e181941cea7d9cddf808.zip
kernel: fix segmentation fault in mconf on linux
Commit 86c966a8ae9c4e74b912a16a760aaed17c68eb32 caused HOST_LOADLIBES to include -lncurses. This was added for fixing build issues on macOS. This introduces issues on Linux when wide-character ncurses is being used for compiling, but the non-wide-character version is linked in. Fix this by adding the extra override for HOST_LOADLIBES only on macOS. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--include/kernel-build.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index e98d801939..e45b43f00a 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -159,7 +159,9 @@ define BuildKernel
rm -f $(LINUX_DIR)/.config.prev
rm -f $(STAMP_CONFIGURED)
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
- $(_SINGLE)$(KERNEL_MAKE) HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" $$@
+ $(_SINGLE)$(KERNEL_MAKE) \
+ $(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
+ $$@
$(LINUX_RECONF_DIFF) $(LINUX_DIR)/.config > $(LINUX_RECONFIG_TARGET)
install: $(LINUX_DIR)/.image