summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-03-23 05:50:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 14:00:55 +0000
commit45bc21c2752bdfe46a2ae262fec5acd0da185853 (patch)
tree01cb7cecb90f65313d03edbe43e2e4a8f003fb54 /meta/recipes-devtools/gdb/gdb-cross-canadian.inc
parentbb1d7fad7ff8515939f2b5f0b540b9b09604be3c (diff)
downloadast2050-yocto-poky-45bc21c2752bdfe46a2ae262fec5acd0da185853.zip
ast2050-yocto-poky-45bc21c2752bdfe46a2ae262fec5acd0da185853.tar.gz
gdb-cross-canadian: Fix linking issues when python support is enabled
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>
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb-cross-canadian.inc')
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 47d7d28..2b60698 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -1,4 +1,5 @@
inherit cross-canadian
+inherit python-dir
DESCRIPTION = "cross-canadian gdb for ${TARGET_ARCH} target - GNU debugger"
PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
@@ -14,9 +15,9 @@ do_configure_prepend() {
cat > ${WORKDIR}/python << EOF
#! /bin/sh
case "\$2" in
- --includes) echo "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}/" ;;
- --ldflags) echo "-L${STAGING_LIBDIR}/../python${PYTHON_BASEVERSION}/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
- --exec-prefix) echo "/usr" ;;
+ --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
OpenPOWER on IntegriCloud