blob: 0fe7b4e5b06e99f96452ac40dca487d3cbcb7874 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "GNU debugger"
2HOMEPAGE = "http://www.gnu.org/software/gdb/"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003DESCRIPTION = "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."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004SECTION = "devel"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
7LTTNGUST = "lttng-ust"
Patrick Williams213cb262021-08-07 19:21:33 -05008LTTNGUST:arc = ""
9LTTNGUST:aarch64 = ""
10LTTNGUST:mipsarch = ""
11LTTNGUST:sh4 = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013inherit autotools texinfo
14
Patrick Williamsc0f7c042017-02-23 20:41:17 -060015UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release"
16
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017B = "${WORKDIR}/build-${TARGET_SYS}"
18
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
20
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022 --with-curses --disable-multilib --disable-sim \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060023 --without-guile \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024 ${GDBPROPREFIX} ${EXPAT} \
25 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
26 --disable-rpath \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060027 --disable-gas --disable-binutils \
28 --disable-ld --disable-gold \
29 --disable-gprof \
30"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
Andrew Geisslerc926e172021-05-07 16:11:35 -050032PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050033# Use --without-system-readline to compile with readline 5.
34PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050036PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037# ncurses is already a hard DEPENDS, but would be added here if it weren't
38PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060039PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060040PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050041
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042GDBPROPREFIX = "--program-prefix=''"
43
Andrew Geissler6ce62a22020-11-30 19:58:47 -060044DISABLE_STATIC = ""
45
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046do_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
Brad Bishop6e60e8b2018-02-01 10:27:11 -050054# right bits installed by binutils. Same for bfd.info -- also from binutils.
Patrick Williams213cb262021-08-07 19:21:33 -050055do_install:append() {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050056 rm -rf ${D}${libdir}
57 rm -rf ${D}${includedir}
58 rm -rf ${D}${datadir}/locale
Brad Bishop6e60e8b2018-02-01 10:27:11 -050059 rm -f ${D}${infodir}/bfd.info
Patrick Williamsc124f4f2015-09-15 14:41:29 -050060}
61
Patrick Williams213cb262021-08-07 19:21:33 -050062RRECOMMENDS: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 "