blob: 3349719a6b4263c5d42a075d71fe2b512cbb7e17 [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"
Andrew Geissler595f6302022-01-24 19:11:47 +00005DEPENDS = "expat gmp 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 \
Andrew Geissler595f6302022-01-24 19:11:47 +000030 --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060031"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
Patrick Williamse760df82023-05-26 11:10:49 -050033PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034# Use --without-system-readline to compile with readline 5.
35PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
Patrick Williamse760df82023-05-26 11:10:49 -050036PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
Andrew Geissler220dafd2023-10-04 10:18:08 -050038PACKAGECONFIG[tui] = "--enable-tui,--disable-tui,,ncurses-terminfo-base"
Andrew Geissler595f6302022-01-24 19:11:47 +000039PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--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 Williams8e7b46e2023-05-01 14:19:06 -050060 rm -f ${D}${infodir}/sframe-spec.info
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061}
62
Patrick Williams213cb262021-08-07 19:21:33 -050063RRECOMMENDS:gdb:append:linux = " glibc-thread-db "
64RRECOMMENDS:gdb:append:linux-gnueabi = " glibc-thread-db "
65RRECOMMENDS:gdbserver:append:linux = " glibc-thread-db "
66RRECOMMENDS:gdbserver:append:linux-gnueabi = " glibc-thread-db "