summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc')
-rw-r--r--yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc38
1 files changed, 38 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
new file mode 100644
index 000000000..4fd60a615
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -0,0 +1,38 @@
+inherit cross-canadian
+inherit python-dir
+
+SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)"
+PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+BPN = "gdb"
+
+DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-readline nativesdk-python"
+RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python-re \
+ nativesdk-python-codecs nativesdk-python-netclient"
+
+GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
+
+EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"
+
+SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
+
+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}" ;;
+ *) 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
+ cross_canadian_bindirlinks
+}
+
OpenPOWER on IntegriCloud