xref: /openbmc/openbmc/poky/meta/recipes-devtools/strace/strace_6.12.bb (revision 8460358c3d24c71d9d38fd126c745854a6301564)
1*8460358cSPatrick WilliamsSUMMARY = "System call tracing tool"
2*8460358cSPatrick WilliamsHOMEPAGE = "http://strace.io"
3*8460358cSPatrick WilliamsDESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state."
4*8460358cSPatrick WilliamsSECTION = "console/utils"
5*8460358cSPatrick WilliamsLICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
6*8460358cSPatrick WilliamsLIC_FILES_CHKSUM = "file://COPYING;md5=2433d82e1432a76dc3eadd9002bfe304"
7*8460358cSPatrick Williams
8*8460358cSPatrick WilliamsSRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/strace-${PV}.tar.xz \
9*8460358cSPatrick Williams           file://update-gawk-paths.patch \
10*8460358cSPatrick Williams           file://Makefile-ptest.patch \
11*8460358cSPatrick Williams           file://run-ptest \
12*8460358cSPatrick Williams           file://ptest-spacesave.patch \
13*8460358cSPatrick Williams           file://0001-strace-fix-reproducibilty-issues.patch \
14*8460358cSPatrick Williams           file://skip-load.patch \
15*8460358cSPatrick Williams           file://0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch \
16*8460358cSPatrick Williams           file://0002-tests-Replace-off64_t-with-off_t.patch \
17*8460358cSPatrick Williams           "
18*8460358cSPatrick WilliamsSRC_URI[sha256sum] = "c47da93be45b6055f4dc741d7f20efaf50ca10160a5b100c109b294fd9c0bdfe"
19*8460358cSPatrick Williams
20*8460358cSPatrick Williams
21*8460358cSPatrick Williamsinherit autotools github-releases ptest
22*8460358cSPatrick Williams
23*8460358cSPatrick Williams# Not yet ported to rv32
24*8460358cSPatrick WilliamsCOMPATIBLE_HOST:riscv32 = "null"
25*8460358cSPatrick Williams
26*8460358cSPatrick Williams# bluez is not enabled by default due to build dependency creep in smaller builds
27*8460358cSPatrick Williams# like core-image-minimal leading to significantly more tasks being executed
28*8460358cSPatrick WilliamsPACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5"
29*8460358cSPatrick WilliamsPACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
30*8460358cSPatrick Williams
31*8460358cSPatrick WilliamsEXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror"
32*8460358cSPatrick Williams
33*8460358cSPatrick WilliamsCFLAGS:append:libc-musl = " -Dsigcontext_struct=sigcontext"
34*8460358cSPatrick Williams
35*8460358cSPatrick WilliamsTESTDIR = "tests"
36*8460358cSPatrick WilliamsPTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)"
37*8460358cSPatrick Williams
38*8460358cSPatrick Williamsdo_compile_ptest() {
39*8460358cSPatrick Williams	oe_runmake -C ${TESTDIR} buildtest-TESTS
40*8460358cSPatrick Williams}
41*8460358cSPatrick Williams
42*8460358cSPatrick Williamsdo_install_ptest() {
43*8460358cSPatrick Williams	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
44*8460358cSPatrick Williams	mkdir -p ${D}${PTEST_PATH}/build-aux
45*8460358cSPatrick Williams	mkdir -p ${D}${PTEST_PATH}/src
46*8460358cSPatrick Williams	install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
47*8460358cSPatrick Williams	install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/
48*8460358cSPatrick Williams	sed -e '/^src/s/strace.*[0-9]/ptest/' \
49*8460358cSPatrick Williams	    -e "/^TEST_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \
50*8460358cSPatrick Williams	    -i ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
51*8460358cSPatrick Williams}
52*8460358cSPatrick Williams
53*8460358cSPatrick WilliamsRDEPENDS:${PN}-ptest += "make coreutils grep gawk sed locale-base-en-us"
54*8460358cSPatrick Williams
55*8460358cSPatrick WilliamsBBCLASSEXTEND = "native"
56