Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext \ |
| 9 | virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | |
| 11 | GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" |
| 12 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | # Overrides PACKAGECONFIG variables in gdb-common.inc |
| 14 | PACKAGECONFIG ??= "python readline" |
| 15 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python, \ |
| 16 | nativesdk-python-core nativesdk-python-lang nativesdk-python-re \ |
| 17 | nativesdk-python-codecs nativesdk-python-netclient" |
| 18 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | |
| 20 | SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb" |
| 21 | |
| 22 | do_configure_prepend() { |
| 23 | cat > ${WORKDIR}/python << EOF |
| 24 | #! /bin/sh |
| 25 | case "\$2" in |
| 26 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;; |
| 27 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;; |
| 28 | --exec-prefix) echo "${exec_prefix}" ;; |
| 29 | *) exit 1 ;; |
| 30 | esac |
| 31 | exit 0 |
| 32 | EOF |
| 33 | chmod +x ${WORKDIR}/python |
| 34 | } |
| 35 | |
| 36 | # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the |
| 37 | # right bits installed by binutils. |
| 38 | do_install_append() { |
| 39 | rm -rf ${D}${exec_prefix}/lib |
| 40 | cross_canadian_bindirlinks |
| 41 | } |
| 42 | |