summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch')
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
new file mode 100644
index 0000000000..fc7b778be1
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -0,0 +1,71 @@
1From: Jason Wessel <jason.wessel@windriver.com>
2Date: Sun, 3 Mar 2013 12:31:40 -0600
3Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location
4
5Upstream-status: Submitted
6
7[ based on: https://lkml.org/lkml/2013/3/3/103 ]
8
9This patch syncs up with the way the menuconfig ncurses / curses
10is detected and the HOST_EXTRACFLAGS works in the Linux kernel
11and it allows the menuconfig to work with a sysroot version
12of the curses libraries.
13
14---
15
16In some cross build environments such as the Yocto Project build
17environment it provides an ncurses library that is compiled
18differently than the host's version. This causes display corruption
19problems when the host's curses includes are used instead of the
20includes from the provided compiler are overridden. There is a second
21case where there is no curses libraries at all on the host system and
22menuconfig will just fail entirely.
23
24The solution is simply to allow an override variable in
25check-lxdialog.sh for environments such as the Yocto Project. Adding
26a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
27compiling and linking against the right headers and libraries.
28
29Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
30cc: Michal Marek <mmarek@suse.cz>
31cc: linux-kbuild@vger.kernel.org
32---
33 scripts/kconfig/lxdialog/Makefile | 2 +-
34 scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
35 2 files changed, 9 insertions(+), 1 deletion(-)
36
37--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
38+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
39@@ -4,6 +4,10 @@
40 # What library to link
41 ldflags()
42 {
43+ if [ x"$CROSS_CURSES_LIB" != x ]; then
44+ echo "$CROSS_CURSES_LIB"
45+ exit
46+ fi
47 for ext in so a dylib ; do
48 for lib in ncursesw ncurses curses ; do
49 $cc -print-file-name=lib${lib}.${ext} | grep -q /
50@@ -19,6 +23,10 @@ ldflags()
51 # Where is ncurses.h?
52 ccflags()
53 {
54+ if [ x"$CROSS_CURSES_INC" != x ]; then
55+ echo "$CROSS_CURSES_INC"
56+ exit
57+ fi
58 if [ -f /usr/include/ncursesw/ncurses.h ]; then
59 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
60 elif [ -f /usr/include/ncursesw/curses.h ]; then
61--- a/scripts/kconfig/lxdialog/Makefile
62+++ b/scripts/kconfig/lxdialog/Makefile
63@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
64
65 # Use reursively expanded variables so we do not call gcc unless
66 # we really need to do so. (Do not call gcc as part of make mrproper)
67-HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
68+HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
69 HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
70
71 HOST_EXTRACFLAGS += -DLOCALE