1SUMMARY = "GNU debugger"
2HOMEPAGE = "http://www.gnu.org/software/gdb/"
3DESCRIPTION = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed."
4SECTION = "devel"
5DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
6
7LTTNGUST = "lttng-ust"
8LTTNGUST_arc = ""
9LTTNGUST_aarch64 = ""
10LTTNGUST_mipsarch = ""
11LTTNGUST_sh4 = ""
12
13inherit autotools texinfo
14
15UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release"
16
17B = "${WORKDIR}/build-${TARGET_SYS}"
18
19EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
20
21EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
22                --with-curses --disable-multilib --disable-sim \
23                --without-guile \
24                ${GDBPROPREFIX} ${EXPAT} \
25                ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
26                --disable-rpath \
27                --disable-gas --disable-binutils \
28                --disable-ld --disable-gold \
29                --disable-gprof \
30"
31
32PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
33# Use --without-system-readline to compile with readline 5.
34PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
35PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
36PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
37# ncurses is already a hard DEPENDS, but would be added here if it weren't
38PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
39PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
40PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
41
42GDBPROPREFIX = "--program-prefix=''"
43
44DISABLE_STATIC = ""
45
46do_configure () {
47	# override this function to avoid the autoconf/automake/aclocal/autoheader
48	# calls for now
49	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
50	oe_runconf
51}
52
53# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
54# right bits installed by binutils.  Same for bfd.info -- also from binutils.
55do_install_append() {
56	rm -rf ${D}${libdir}
57	rm -rf ${D}${includedir}
58	rm -rf ${D}${datadir}/locale
59	rm -f ${D}${infodir}/bfd.info
60}
61
62RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
63RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db "
64RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db "
65RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db "
66