Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit cross-canadian |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 2 | inherit python3-dir |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 15 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \ |
| 16 | nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \ |
| 17 | nativesdk-python3-codecs nativesdk-python3-netclient" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 26 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; |
| 27 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |