1 From 846b11d8c834af4fa62393dadb490ea8246b332c Mon Sep 17 00:00:00 2001
2 From: Bruce Ashfield <bruce.ashfield@windriver.com>
3 Date: Mon, 2 Jul 2018 23:10:28 -0400
4 Subject: [PATCH] menuconfig,mconf-cfg: Allow specification of ncurses location
6 In some cross build environments such as the Yocto Project build
7 environment it provides an ncurses library that is compiled
8 differently than the host's version. This causes display corruption
9 problems when the host's curses includes are used instead of the
10 includes from the provided compiler are overridden. There is a second
11 case where there is no curses libraries at all on the host system and
12 menuconfig will just fail entirely.
14 The solution is simply to allow an override variable in
15 check-lxdialog.sh for environments such as the Yocto Project. Adding
16 a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
17 compiling and linking against the right headers and libraries.
19 Stolen from linux-yocto [1]
21 [1] http://git.yoctoproject.org/cgit.cgi/linux-yocto/commit/?id=846b11d8c834af4fa62393dadb490ea8246b332c
23 Upstream-Status: Pending
25 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
26 cc: Michal Marek <mmarek@suse.cz>
27 cc: linux-kbuild@vger.kernel.org
28 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
30 scripts/kconfig/mconf-cfg.sh | 8 ++++++++
31 1 file changed, 8 insertions(+)
32 mode change 100755 => 100644 scripts/kconfig/mconf-cfg.sh
34 diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
37 index c812872d7f9d..65a9b9e5b8a6
38 --- a/scripts/kconfig/mconf-cfg.sh
39 +++ b/scripts/kconfig/mconf-cfg.sh
44 +if [ "$CROSS_CURSES_LIB" != "" ]; then
45 + echo libs=\'$CROSS_CURSES_LIB\'
46 + if [ x"$CROSS_CURSES_INC" != x ]; then
47 + echo cflags=\'$CROSS_CURSES_INC\'
52 if [ -n "$(command -v pkg-config)" ]; then
53 if pkg-config --exists $PKG; then
54 echo cflags=\"$(pkg-config --cflags $PKG)\"