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 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc" |
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 |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 14 | PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 15 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 16 | nativesdk-python3-core \ |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 17 | nativesdk-python3-codecs nativesdk-python3-netclient \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | " |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 19 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 20 | PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, nativesdk-elfutils" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | |
| 22 | SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb" |
| 23 | |
| 24 | do_configure_prepend() { |
| 25 | cat > ${WORKDIR}/python << EOF |
| 26 | #! /bin/sh |
| 27 | case "\$2" in |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 28 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; |
| 29 | --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] | 30 | --exec-prefix) echo "${exec_prefix}" ;; |
| 31 | *) exit 1 ;; |
| 32 | esac |
| 33 | exit 0 |
| 34 | EOF |
| 35 | chmod +x ${WORKDIR}/python |
| 36 | } |
| 37 | |
| 38 | # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the |
| 39 | # right bits installed by binutils. |
| 40 | do_install_append() { |
| 41 | rm -rf ${D}${exec_prefix}/lib |
| 42 | cross_canadian_bindirlinks |
| 43 | } |