blob: 925b0c2f8024d689c8abe0c7e045dcb2ae29c29c [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
Andrew Geisslerc926e172021-05-07 16:11:35 -050033PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
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 Williamsc0f7c042017-02-23 20:41:17 -060036PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038# ncurses is already a hard DEPENDS, but would be added here if it weren't
39PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
Andrew Geissler595f6302022-01-24 19:11:47 +000040PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060041PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050042
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043GDBPROPREFIX = "--program-prefix=''"
44
Andrew Geissler6ce62a22020-11-30 19:58:47 -060045DISABLE_STATIC = ""
46
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047do_configure () {
48 # override this function to avoid the autoconf/automake/aclocal/autoheader
49 # calls for now
50 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
51 oe_runconf
52}
53
54# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
Brad Bishop6e60e8b2018-02-01 10:27:11 -050055# right bits installed by binutils. Same for bfd.info -- also from binutils.
Patrick Williams213cb262021-08-07 19:21:33 -050056do_install:append() {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057 rm -rf ${D}${libdir}
58 rm -rf ${D}${includedir}
59 rm -rf ${D}${datadir}/locale
Brad Bishop6e60e8b2018-02-01 10:27:11 -050060 rm -f ${D}${infodir}/bfd.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 "