Files
poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
Richard Purdie ebdbd105ef gdb: Include xz support by default and clean up PACKAGECONFIG
Firstly, just include xz support in all gdb configurations to simplify config.
Most systems would already have the shared library so this isn't a big problem
for a larger debugging tool.

The PACKAGECONFIG duplication is also confusing. The only PACKAGECONFIG which
needs special handking is the python one due to the differing modules needed
in the nativesdk case. Remove all the other duplicate entries which should work
through our usual class extension code.

(From OE-Core rev: d6eefdd66171c2bcdeeebc8a9b583c5383c80bf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-18 22:53:45 +00:00

41 lines
1.4 KiB
PHP

inherit cross-canadian
inherit python3-dir
inherit pkgconfig
SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)"
PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "gdb"
DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp nativesdk-mpfr \
virtual/nativesdk-cross-cc virtual/nativesdk-cross-binutils virtual/nativesdk-libc"
GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
# Overrides PACKAGECONFIG variables in gdb-common.inc
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
nativesdk-python3-core \
nativesdk-python3-codecs nativesdk-python3-netclient"
SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_DATADIR}/gdb"
do_configure:prepend() {
cat > ${WORKDIR}/python << EOF
#! /bin/sh
case "\$2" in
--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
--exec-prefix) echo "${exec_prefix}" ;;
*) exit 1 ;;
esac
exit 0
EOF
chmod +x ${WORKDIR}/python
}
# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
# right bits installed by binutils.
do_install:append() {
rm -rf ${D}${exec_prefix}/lib
cross_canadian_bindirlinks
}