]> code.ossystems Code Review - openembedded-core.git/commitdiff
gdb-common.inc: add PACKAGECONFIG for readline
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 28 Jan 2016 09:46:35 +0000 (01:46 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Jan 2016 18:14:57 +0000 (18:14 +0000)
When compile with readline 5.2:
completer.o: In function `gdb_display_match_list':
completer.c:(.text+0x1c13): undefined reference to `_rl_completion_prefix_display_length'
completer.c:(.text+0x1ce8): undefined reference to `rl_sort_completion_matches'
collect2: ld returned 1 exit status

The --without-system-readline will make it work.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/gdb/gdb-common.inc

index 166ba8eeab91754e64a591679b2e52b4007a3a15..6baeb0ba9b4c34c04ea827e96f18efee5b553b98 100644 (file)
@@ -2,7 +2,7 @@ SUMMARY = "GNU debugger"
 HOMEPAGE = "http://www.gnu.org/software/gdb/"
 LICENSE = "GPLv3+"
 SECTION = "devel"
-DEPENDS = "expat zlib ncurses readline ${LTTNGUST}"
+DEPENDS = "expat zlib ncurses ${LTTNGUST}"
 
 LTTNGUST = "lttng-ust"
 LTTNGUST_aarch64 = ""
@@ -40,13 +40,17 @@ EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
 EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
 
 EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
-                --with-curses --disable-multilib --with-system-readline --disable-sim \
+                --with-curses --disable-multilib --disable-sim \
                 --without-lzma --without-guile \
                 ${GDBPROPREFIX} ${EXPAT} \
                 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
                 --disable-rpath \
                "
 
+PACKAGECONFIG ??= "readline"
+# Use --without-system-readline to compile with readline 5.
+PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
+
 GDBPROPREFIX = "--program-prefix=''"
 
 do_configure () {