xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/gdb/gdb-common.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "GNU debugger"
2*4882a593SmuzhiyunHOMEPAGE = "http://www.gnu.org/software/gdb/"
3*4882a593SmuzhiyunDESCRIPTION = "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."
4*4882a593SmuzhiyunSECTION = "devel"
5*4882a593SmuzhiyunDEPENDS = "expat gmp zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLTTNGUST = "lttng-ust"
8*4882a593SmuzhiyunLTTNGUST:arc = ""
9*4882a593SmuzhiyunLTTNGUST:aarch64 = ""
10*4882a593SmuzhiyunLTTNGUST:mipsarch = ""
11*4882a593SmuzhiyunLTTNGUST:sh4 = ""
12*4882a593Smuzhiyun
13*4882a593Smuzhiyuninherit autotools texinfo
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunUPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunB = "${WORKDIR}/build-${TARGET_SYS}"
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunEXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunEXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
22*4882a593Smuzhiyun                --with-curses --disable-multilib --disable-sim \
23*4882a593Smuzhiyun                --without-guile \
24*4882a593Smuzhiyun                ${GDBPROPREFIX} ${EXPAT} \
25*4882a593Smuzhiyun                ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
26*4882a593Smuzhiyun                --disable-rpath \
27*4882a593Smuzhiyun                --disable-gas --disable-binutils \
28*4882a593Smuzhiyun                --disable-ld --disable-gold \
29*4882a593Smuzhiyun                --disable-gprof \
30*4882a593Smuzhiyun                --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
31*4882a593Smuzhiyun"
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunPACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
34*4882a593Smuzhiyun# Use --without-system-readline to compile with readline 5.
35*4882a593SmuzhiyunPACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
36*4882a593SmuzhiyunPACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
37*4882a593SmuzhiyunPACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
38*4882a593Smuzhiyun# ncurses is already a hard DEPENDS, but would be added here if it weren't
39*4882a593SmuzhiyunPACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
40*4882a593SmuzhiyunPACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz"
41*4882a593SmuzhiyunPACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunGDBPROPREFIX = "--program-prefix=''"
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunDISABLE_STATIC = ""
46*4882a593Smuzhiyun
47*4882a593Smuzhiyundo_configure () {
48*4882a593Smuzhiyun	# override this function to avoid the autoconf/automake/aclocal/autoheader
49*4882a593Smuzhiyun	# calls for now
50*4882a593Smuzhiyun	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
51*4882a593Smuzhiyun	oe_runconf
52*4882a593Smuzhiyun}
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
55*4882a593Smuzhiyun# right bits installed by binutils.  Same for bfd.info -- also from binutils.
56*4882a593Smuzhiyundo_install:append() {
57*4882a593Smuzhiyun	rm -rf ${D}${libdir}
58*4882a593Smuzhiyun	rm -rf ${D}${includedir}
59*4882a593Smuzhiyun	rm -rf ${D}${datadir}/locale
60*4882a593Smuzhiyun	rm -f ${D}${infodir}/bfd.info
61*4882a593Smuzhiyun}
62*4882a593Smuzhiyun
63*4882a593SmuzhiyunRRECOMMENDS:gdb:append:linux = " glibc-thread-db "
64*4882a593SmuzhiyunRRECOMMENDS:gdb:append:linux-gnueabi = " glibc-thread-db "
65*4882a593SmuzhiyunRRECOMMENDS:gdbserver:append:linux = " glibc-thread-db "
66*4882a593SmuzhiyunRRECOMMENDS:gdbserver:append:linux-gnueabi = " glibc-thread-db "
67