summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorEric BENARD <eric@eukrea.com>2012-02-26 08:49:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-26 11:00:07 +0000
commit1cb4614f1d5e482b88ea372d1841a6c313a49941 (patch)
tree5f624d6031ea79ffd7d85d1350f5a747543f6d5a /meta
parent56bbea6dcf44e767274798e35dd46447ffaefc34 (diff)
downloadpoky-1cb4614f1d5e482b88ea372d1841a6c313a49941.tar.gz
gdb-cross-canadian: build gdb with python support
* python support is needed for providing finer scripting control in gdb, and for remote controling gdb for example from qtcreator * gdb/configure tries to autodetect python using python executable with --includes --ldflags --exec-prefix to get the right flags As it's difficult to achieve in OE's context, we generate a script which will return the right values and make gdb's build system happy. This idea was taken from the following article : http://www.mentby.com/doug-evans-2/python-enabled-gdb-on-windows-and-relocation.html * tested using angstrom & armv7 target & qtcreator 201005 & 2.4.0 * MJ: updated paths to python as disscussed here http://lists.linuxtogo.org/pipermail/openembedded-core/2012-February/018222.html now it's easier with cross-canadian staging dir and SDKPATH fixed :) (From OE-Core rev: 73a90b88541c373aa5b83a939dd3b5f1fe05b9b8) Signed-off-by: Eric BĂ©nard <eric@eukrea.com> Cc: fcooper@ti.com Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian.inc20
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb2
2 files changed, 20 insertions, 2 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index ec0748e527..a7cac615d8 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -4,4 +4,22 @@ DESCRIPTION = "cross-canadian gdb for ${TARGET_ARCH} target - GNU debugger"
4PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" 4PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
5BPN = "gdb" 5BPN = "gdb"
6 6
7DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk readline-nativesdk" 7DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk readline-nativesdk python-nativesdk"
8RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \
9 python-nativesdk-codecs python-nativesdk-netclient"
10
11EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
12
13do_configure_prepend() {
14cat > ${WORKDIR}/python << EOF
15#! /bin/sh
16case "\$2" in
17 --includes) echo "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}/" ;;
18 --ldflags) echo "-L${STAGING_LIBDIR}/../python${PYTHON_BASEVERSION}/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
19 --exec-prefix) echo "/usr" ;;
20 *) exit 1 ;;
21esac
22exit 0
23EOF
24 chmod +x ${WORKDIR}/python
25}
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb
index a4714e78bd..dbcffde4e9 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.4.bb
@@ -1,7 +1,7 @@
1require gdb-common.inc 1require gdb-common.inc
2require gdb-cross-canadian.inc 2require gdb-cross-canadian.inc
3 3
4PR = "${INC_PR}.1" 4PR = "${INC_PR}.3"
5 5
6GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" 6GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
7EXPAT = "--with-expat" 7EXPAT = "--with-expat"