mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
gdb-cross-canadian was linking with static version of libpython and looking for build host python when run. This could be mismatch between python-nativesdk and build host provided python. So we make it consistent to always use python-nativesdk Instead of adding bunch of -L we add -rpath and -rpath-link so that gdb finds all needed libraries in SDK and does not reach out into host This should fix yocto PR# 2077 as well. (From OE-Core rev: d56177c59b5e237a501281d806724885456f0193) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
inherit cross-canadian
|
|
inherit python-dir
|
|
|
|
DESCRIPTION = "cross-canadian gdb for ${TARGET_ARCH} target - GNU debugger"
|
|
PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
|
|
BPN = "gdb"
|
|
|
|
DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk readline-nativesdk python-nativesdk"
|
|
RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \
|
|
python-nativesdk-codecs python-nativesdk-netclient"
|
|
|
|
EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
|
|
|
|
do_configure_prepend() {
|
|
cat > ${WORKDIR}/python << EOF
|
|
#! /bin/sh
|
|
case "\$2" in
|
|
--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
|
|
--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
|
|
--exec-prefix) echo "${exec_prefix}/bin" ;;
|
|
*) 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
|
|
}
|