diff options
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb-cross-canadian.inc')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc new file mode 100644 index 0000000000..844dce9451 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc | |||
@@ -0,0 +1,38 @@ | |||
1 | inherit cross-canadian | ||
2 | inherit python-dir | ||
3 | |||
4 | SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)" | ||
5 | PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" | ||
6 | BPN = "gdb" | ||
7 | |||
8 | DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-readline nativesdk-python" | ||
9 | RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python-re \ | ||
10 | nativesdk-python-codecs nativesdk-python-netclient" | ||
11 | |||
12 | GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" | ||
13 | |||
14 | EXTRA_OECONF_append = "--with-python=${WORKDIR}/python" | ||
15 | |||
16 | SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb" | ||
17 | |||
18 | do_configure_prepend() { | ||
19 | cat > ${WORKDIR}/python << EOF | ||
20 | #! /bin/sh | ||
21 | case "\$2" in | ||
22 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;; | ||
23 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;; | ||
24 | --exec-prefix) echo "${exec_prefix}" ;; | ||
25 | *) exit 1 ;; | ||
26 | esac | ||
27 | exit 0 | ||
28 | EOF | ||
29 | chmod +x ${WORKDIR}/python | ||
30 | } | ||
31 | |||
32 | # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the | ||
33 | # right bits installed by binutils. | ||
34 | do_install_append() { | ||
35 | rm -rf ${D}${exec_prefix}/lib | ||
36 | cross_canadian_bindirlinks | ||
37 | } | ||
38 | |||