All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe] gdb-cross-canadian: build gdb with python support
@ 2011-12-23  7:12 Eric Bénard
  2011-12-23 11:02 ` Otavio Salvador
  2012-01-04  5:18 ` Khem Raj
  0 siblings, 2 replies; 19+ messages in thread
From: Eric Bénard @ 2011-12-23  7:12 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Eric Bénard

* 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>
---
 .../gdb/gdb-cross-canadian_7.3.1.bbappend          |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend

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 0000000..3bbfe38
--- /dev/null
+++ b/meta-oe/recipes-devtools/gdb/gdb-cross-canadian_7.3.1.bbappend
@@ -0,0 +1,20 @@
+DEPENDS += "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"
+PRINC = "1"
+
+do_configure_prepend() {
+cat > ${WORKDIR}/python << EOF
+#! /bin/sh
+case "\$2" in
+	--includes) echo "-I${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}${exec_prefix}/include/python${PYTHON_BASEVERSION}/" ;;
+	--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}" ;;
+	--exec-prefix) echo "/usr" ;;
+	*) exit 1 ;;
+esac
+exit 0
+EOF
+	chmod +x ${WORKDIR}/python
+}
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-02-03 14:00 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23  7:12 [meta-oe] gdb-cross-canadian: build gdb with python support Eric Bénard
2011-12-23 11:02 ` Otavio Salvador
2012-01-04  5:18 ` Khem Raj
2012-01-04  8:05   ` Eric Bénard
2012-02-02  7:45     ` Martin Jansa
2012-02-02  8:06       ` Eric Bénard
2012-02-02  8:40       ` Martin Jansa
2012-02-02  9:17         ` Martin Jansa
2012-02-02 10:11           ` Eric Bénard
2012-02-03  7:28             ` Martin Jansa
2012-02-03  9:41               ` SDK confusion Was: [oe] " Martin Jansa
2012-02-03  9:41                 ` SDK confusion Was: " Martin Jansa
2012-02-03 10:20                 ` [oe] " Eric Bénard
2012-02-03 10:20                   ` Eric Bénard
2012-02-03 11:44                   ` [oe] " Martin Jansa
2012-02-03 11:44                     ` [OE-core] " Martin Jansa
2012-02-03 13:52                     ` [oe] " Eric Bénard
2012-02-03 13:52                       ` [OE-core] " Eric Bénard
2012-02-02  8:58       ` Eric Bénard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.