diff options
author | Eric BENARD <eric@eukrea.com> | 2011-12-23 07:12:16 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-12-23 09:08:15 +0100 |
commit | d3c1760a8fc9365585888b5d6a3db9965eb0174f (patch) | |
tree | 9dab291fcb0ac0779fd61f092ae365c44af1517b /meta-oe | |
parent | 041f97a5988ad12477ec70206f1b712738d1350c (diff) | |
download | meta-openembedded-d3c1760a8fc9365585888b5d6a3db9965eb0174f.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/armv5 targets & qtcreator 201005 & 2.4.0
Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend new file mode 100644 index 000000000..3bbfe38de --- /dev/null +++ b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend | |||
@@ -0,0 +1,20 @@ | |||
1 | DEPENDS += "python-nativesdk" | ||
2 | RDEPENDS += "python-nativesdk-core python-nativesdk-lang python-nativesdk-re \ | ||
3 | python-nativesdk-codecs python-nativesdk-netclient" | ||
4 | |||
5 | EXTRA_OECONF_append = "--with-python=${WORKDIR}/python" | ||
6 | PRINC = "1" | ||
7 | |||
8 | do_configure_prepend() { | ||
9 | cat > ${WORKDIR}/python << EOF | ||
10 | #! /bin/sh | ||
11 | case "\$2" in | ||
12 | --includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;; | ||
13 | --ldflags) echo "-L${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${libdir}/python${PYTHON_BASEVERSION}/config/config -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;; | ||
14 | --exec-prefix) echo "/usr" ;; | ||
15 | *) exit 1 ;; | ||
16 | esac | ||
17 | exit 0 | ||
18 | EOF | ||
19 | chmod +x ${WORKDIR}/python | ||
20 | } | ||