diff options
4 files changed, 108 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch new file mode 100644 index 0000000000..2b54750e7a --- /dev/null +++ b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From a8c3996d3f8d9b8f3a2888b7062c1139263c5aba Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Wen Yang <yellowriver2010@hotmail.com> | ||
| 3 | Date: Mon, 23 Jun 2025 02:06:53 +0800 | ||
| 4 | Subject: [PATCH] tests: fix the issue of cross compilation failure | ||
| 5 | |||
| 6 | By replacing objcopy with MAKE_OBJCOPY, pstack could support both | ||
| 7 | native and cross compilation. | ||
| 8 | |||
| 9 | Upstream-Status: Backport [https://github.com/peadar/pstack/pull/38] | ||
| 10 | --- | ||
| 11 | tests/CMakeLists.txt | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt | ||
| 15 | index 71a62a7..bf11a04 100644 | ||
| 16 | --- a/tests/CMakeLists.txt | ||
| 17 | +++ b/tests/CMakeLists.txt | ||
| 18 | @@ -38,7 +38,7 @@ SET_TARGET_PROPERTIES(noreturn PROPERTIES COMPILE_FLAGS "-O2 -g") | ||
| 19 | |||
| 20 | add_custom_command( | ||
| 21 | OUTPUT basic-no-unwind-gen | ||
| 22 | - COMMAND objcopy --strip-debug --remove-section .eh_frame basic basic-no-unwind | ||
| 23 | + COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section .eh_frame basic basic-no-unwind | ||
| 24 | VERBATIM ) | ||
| 25 | |||
| 26 | add_custom_target(basic-no-unwind ALL DEPENDS basic basic-no-unwind-gen) | ||
| 27 | -- | ||
| 28 | 2.25.1 | ||
diff --git a/meta-oe/recipes-devtools/pstack/pstack.inc b/meta-oe/recipes-devtools/pstack/pstack.inc new file mode 100644 index 0000000000..9831a74d1a --- /dev/null +++ b/meta-oe/recipes-devtools/pstack/pstack.inc | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | SUMMARY = "A utility to print stack traces of running processes" | ||
| 2 | DESCRIPTION = "A from-scratch implementation of pstack using DWARF debugging and unwind information. \ | ||
| 3 | Works for C/C++, Go, Rust, and Python. A traditional pstack command can generally print a backtrace \ | ||
| 4 | of each thread in a running program, and sometimes from a core file. This version of pstack uses its \ | ||
| 5 | own self contained ELF and DWARF parsing library, libdwelf to parse the DWARF debug and unwind \ | ||
| 6 | information, to get a stack trace." | ||
| 7 | HOMEPAGE = "https://github.com/peadar/pstack" | ||
| 8 | SECTION = "devel" | ||
| 9 | LICENSE = "BSD-2-Clause" | ||
| 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=671019a96ba80415b696240ed2ca5e80" | ||
| 11 | |||
| 12 | inherit cmake | ||
| 13 | |||
| 14 | S = "${UNPACKDIR}/${BPN}-${PV}" | ||
| 15 | DEPENDS += "zlib xz libunwind elfutils" | ||
| 16 | |||
| 17 | RDEPENDS:${PN} += "elfutils" | ||
| 18 | |||
| 19 | do_install() { | ||
| 20 | install -d ${D}${bindir} | ||
| 21 | install -m 0755 ${B}/pstack ${D}${bindir}/pstack | ||
| 22 | |||
| 23 | install -d ${D}${libdir} | ||
| 24 | install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV} | ||
| 25 | ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so | ||
| 26 | install -m 0755 ${B}/libdwelf.so.${PV} ${D}${libdir}/libdwelf.so.${PV} | ||
| 27 | ln -sf libdwelf.so.${PV} ${D}${libdir}/libdwelf.so | ||
| 28 | } | ||
| 29 | |||
| 30 | PACKAGES = "${PN}" | ||
| 31 | FILES:${PN} = "${bindir}/pstack" | ||
| 32 | FILES:${PN} += "${libdir}/libprocman.so.${PV}" | ||
| 33 | FILES:${PN} += "${libdir}/libdwelf.so.${PV}" | ||
| 34 | |||
| 35 | PACKAGES += "${PN}-dbg" | ||
| 36 | FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" | ||
| 37 | |||
| 38 | PACKAGES += "${PN}-dev" | ||
| 39 | FILES:${PN}-dev += "${base_libdir}/*.so" | ||
diff --git a/meta-oe/recipes-devtools/pstack/pstack_2.10.bb b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb new file mode 100644 index 0000000000..cebc13d36c --- /dev/null +++ b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | SUMMARY = "A from-scratch implementation of pstack using DWARF debugging \ | ||
| 2 | and unwind information. Works for C/C++, Go, Rust, and Python." | ||
| 3 | |||
| 4 | HOMEPAGE = "https://github.com/peadar/pstack" | ||
| 5 | SECTION = "devel/pstack" | ||
| 6 | |||
| 7 | LICENSE = "BSD-2-Clause" | ||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ea061f8731d5e6a5761dfad951ef5f5f" | ||
| 9 | |||
| 10 | DEPENDS = "tcl virtual/libx11 libxt zip-native" | ||
| 11 | |||
| 12 | SRC_URI = "git://github.com/peadar/pstack;branch=master;tag=v${PV};protocol=https" | ||
| 13 | SRCREV = "a310df637d74917a1d3570c540bf3aef899d7e63" | ||
| 14 | |||
| 15 | S = "${WORKDIR}/${BPN}${PV}" | ||
| 16 | |||
| 17 | PACKAGES =+ "${PN}-lib" | ||
| 18 | |||
| 19 | SOLIBS = ".so" | ||
| 20 | FILES_SOLIBSDEV = "" | ||
| 21 | |||
| 22 | # isn't getting picked up by shlibs code | ||
| 23 | RDEPENDS:${PN} += "tk-lib" | ||
| 24 | RDEPENDS:${PN}:class-native = "" | ||
| 25 | |||
| 26 | BBCLASSEXTEND = "native nativesdk" | ||
| 27 | |||
| 28 | inherit binconfig | ||
| 29 | |||
| 30 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
| 31 | |||
| 32 | # Fix some paths that might be used by Tcl extensions | ||
| 33 | BINCONFIG_GLOB = "*Config.sh" | ||
diff --git a/meta-oe/recipes-devtools/pstack/pstack_git.bb b/meta-oe/recipes-devtools/pstack/pstack_git.bb new file mode 100644 index 0000000000..cc6721f9e3 --- /dev/null +++ b/meta-oe/recipes-devtools/pstack/pstack_git.bb | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | require pstack.inc | ||
| 2 | |||
| 3 | SRCREV = "1e1734be3adb6d9c81b57c5cc3d0c8fbc43bdee3" | ||
| 4 | PV = "2.11" | ||
| 5 | |||
| 6 | SRC_URI = "git://github.com/peadar/pstack.git;branch=master;protocol=https \ | ||
| 7 | file://0001-tests-fix-the-issue-of-cross-compilation-failure.patch \ | ||
| 8 | " | ||
