[source] kernel: fix segmentation fault in mconf on linux

LEDE Commits lede-commits at lists.infradead.org
Wed Jun 7 09:32:05 PDT 2017

nbd pushed a commit to source.git, branch master:

commit fec38ebf0d0ffba22937e181941cea7d9cddf808
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jun 7 18:14:27 2017 +0200

    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 at nbd.name>
 include/kernel-build.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index e98d801..e45b43f 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -159,7 +159,9 @@ define BuildKernel
 	rm -f $(LINUX_DIR)/.config.prev
 	$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
+		$(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
+		$$@
   install: $(LINUX_DIR)/.image

More information about the lede-commits mailing list