summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-11-07 21:58:15 +0100
committerJakov Smolić <jsmolic@gentoo.org>2021-11-07 21:58:39 +0100
commite576dd19c0e1bdc56ad8e9f356490f456f8dc604 (patch)
treeee9e08ff2d896c5e442d2b37569355b677422c9d
parentdev-util/bpftrace: Drop live ebuild skeleton (diff)
downloadgentoo-e576dd19c0e1bdc56ad8e9f356490f456f8dc604.tar.gz
gentoo-e576dd19c0e1bdc56ad8e9f356490f456f8dc604.tar.bz2
gentoo-e576dd19c0e1bdc56ad8e9f356490f456f8dc604.zip
dev-util/bpftrace: Statically link (partially), avoid stripping bpftrace
bpftrace is currently broken due to BEGIN_trigger symbol missing. To fix this, we need to avoid stripping the binary since it clearly needs to have symbols to work properly, and we also need to link some of the libraries statically into the binary, namely some internal libraries provided by bpftrace need to be statically linked, otherwise the binary will still end up missing the needed symbol (upstream issue - https://github.com/iovisor/bpftrace/issues/954). For previous versions it was enough to skip stripping the binary, but BEGIN_trigger symbol was moved to libbpftrace several versions ago, so even if it is present as a .so library the symbol won't be found. Closes: https://bugs.gentoo.org/809362 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
-rw-r--r--dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild4
1 files changed, 3 insertions, 1 deletions
diff --git a/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild b/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild
index efe4e68822da..4435e4c83795 100644
--- a/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild
+++ b/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit toolchain-funcs llvm linux-info cmake
+inherit llvm linux-info cmake
DESCRIPTION="High-level tracing language for eBPF"
HOMEPAGE="https://github.com/iovisor/bpftrace"
@@ -67,6 +67,7 @@ pkg_setup() {
src_configure() {
local -a mycmakeargs=(
-DSTATIC_LINKING:BOOL=OFF
+ -DBUILD_SHARED_LIBS:=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_FUZZ:BOOL=$(usex fuzzing)
-DENABLE_MAN:BOOL=OFF
@@ -77,5 +78,6 @@ src_configure() {
src_install() {
cmake_src_install
+ dostrip -x /usr/bin/bpftrace
doman man/man8/*.?
}