diff options
Diffstat (limited to 'meta-oe/recipes-devtools/pstack')
4 files changed, 110 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..ee0518c9cc --- /dev/null +++ b/meta-oe/recipes-devtools/pstack/pstack.inc | |||
@@ -0,0 +1,43 @@ | |||
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 | DEPENDS += "zlib xz libunwind elfutils" | ||
15 | |||
16 | RDEPENDS:${PN} += "elfutils" | ||
17 | |||
18 | do_install() { | ||
19 | install -d ${D}${bindir} | ||
20 | install -m 0755 ${B}/pstack ${D}${bindir}/pstack | ||
21 | |||
22 | install -d ${D}${libdir} | ||
23 | install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV} | ||
24 | ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so | ||
25 | install -m 0755 ${B}/libdwelf.so.${PV} ${D}${libdir}/libdwelf.so.${PV} | ||
26 | ln -sf libdwelf.so.${PV} ${D}${libdir}/libdwelf.so | ||
27 | } | ||
28 | |||
29 | PACKAGES = "${PN}" | ||
30 | FILES:${PN} = "${bindir}/pstack" | ||
31 | FILES:${PN} += "${libdir}/libprocman.so.${PV}" | ||
32 | FILES:${PN} += "${libdir}/libdwelf.so.${PV}" | ||
33 | |||
34 | PACKAGES += "${PN}-dbg" | ||
35 | FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" | ||
36 | |||
37 | PACKAGES += "${PN}-dev" | ||
38 | FILES:${PN}-dev += "${base_libdir}/*.so" | ||
39 | |||
40 | TOOLCHAIN = "gcc" | ||
41 | |||
42 | COMPATIBLE_HOST:riscv64 = "null" | ||
43 | COMPATIBLE_HOST:riscv32 = "null" | ||
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..bed49b62ba --- /dev/null +++ b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb | |||
@@ -0,0 +1,31 @@ | |||
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=671019a96ba80415b696240ed2ca5e80" | ||
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 | PACKAGES =+ "${PN}-lib" | ||
16 | |||
17 | SOLIBS = ".so" | ||
18 | FILES_SOLIBSDEV = "" | ||
19 | |||
20 | # isn't getting picked up by shlibs code | ||
21 | RDEPENDS:${PN} += "tk-lib" | ||
22 | RDEPENDS:${PN}:class-native = "" | ||
23 | |||
24 | BBCLASSEXTEND = "native nativesdk" | ||
25 | |||
26 | inherit binconfig | ||
27 | |||
28 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
29 | |||
30 | # Fix some paths that might be used by Tcl extensions | ||
31 | 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 | " | ||