-
Notifications
You must be signed in to change notification settings - Fork 206
/
bpftrace_0.21.2.bb
60 lines (47 loc) · 1.82 KB
/
bpftrace_0.21.2.bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SUMMARY = "bpftrace"
HOMEPAGE = "https://github.com/iovisor/bpftrace"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
DEPENDS += "bison-native \
flex-native \
gzip-native \
elfutils \
bcc \
systemtap \
libcereal \
libbpf \
"
DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native', '', d)}"
RDEPENDS:${PN} += "bash python3 xz"
PV .= "+git"
SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \
file://run-ptest \
file://0001-cmake-Bump-max-LLVM-version-to-19.patch \
file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \
"
SRCREV = "b2e255870ba010d4a7e4852bffcf1c567b016fd0"
S = "${WORKDIR}/git"
inherit cmake ptest
PACKAGECONFIG ?= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
PACKAGECONFIG[tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF,gtest xxd-native"
do_install_ptest() {
if [ -e ${B}/tests/bpftrace_test ]; then
install -Dm 755 ${B}/tests/bpftrace_test ${D}${PTEST_PATH}/tests/bpftrace_test
cp -rf ${B}/tests/runtime ${D}${PTEST_PATH}/tests
cp -rf ${B}/tests/test* ${D}${PTEST_PATH}/tests
fi
}
EXTRA_OECMAKE = " \
-DCMAKE_ENABLE_EXPORTS=1 \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_SYSTEM_BPF_BCC=ON \
-DENABLE_MAN=OFF \
-DBISON_FLAGS='--file-prefix-map=${WORKDIR}=' \
"
COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux"
COMPATIBLE_HOST:libc-musl = "null"
INHIBIT_PACKAGE_STRIP_FILES += "\
${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \
"
WARN_QA:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' buildpaths', '', d)}"
ERROR_QA:remove = "${@bb.utils.contains('PTEST_ENABLED', '1', 'buildpaths', '', d)}"