1 |
commit: e576dd19c0e1bdc56ad8e9f356490f456f8dc604 |
2 |
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 7 20:58:15 2021 +0000 |
4 |
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 7 20:58:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e576dd19 |
7 |
|
8 |
dev-util/bpftrace: Statically link (partially), avoid stripping bpftrace |
9 |
|
10 |
bpftrace is currently broken due to BEGIN_trigger symbol missing. To fix this, |
11 |
we need to avoid stripping the binary since it clearly needs to have |
12 |
symbols to work properly, and we also need to link some of the libraries |
13 |
statically into the binary, namely some internal libraries provided by |
14 |
bpftrace need to be statically linked, otherwise the binary will still |
15 |
end up missing the needed symbol (upstream issue - |
16 |
https://github.com/iovisor/bpftrace/issues/954). For previous versions |
17 |
it was enough to skip stripping the binary, but BEGIN_trigger symbol was |
18 |
moved to libbpftrace several versions ago, so even if it is present as |
19 |
a .so library the symbol won't be found. |
20 |
|
21 |
Closes: https://bugs.gentoo.org/809362 |
22 |
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org> |
23 |
|
24 |
dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild | 4 +++- |
25 |
1 file changed, 3 insertions(+), 1 deletion(-) |
26 |
|
27 |
diff --git a/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild b/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild |
28 |
index efe4e68822d..4435e4c8379 100644 |
29 |
--- a/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild |
30 |
+++ b/dev-util/bpftrace/bpftrace-0.14.0-r3.ebuild |
31 |
@@ -3,7 +3,7 @@ |
32 |
|
33 |
EAPI=7 |
34 |
|
35 |
-inherit toolchain-funcs llvm linux-info cmake |
36 |
+inherit llvm linux-info cmake |
37 |
|
38 |
DESCRIPTION="High-level tracing language for eBPF" |
39 |
HOMEPAGE="https://github.com/iovisor/bpftrace" |
40 |
@@ -67,6 +67,7 @@ pkg_setup() { |
41 |
src_configure() { |
42 |
local -a mycmakeargs=( |
43 |
-DSTATIC_LINKING:BOOL=OFF |
44 |
+ -DBUILD_SHARED_LIBS:=OFF |
45 |
-DBUILD_TESTING:BOOL=OFF |
46 |
-DBUILD_FUZZ:BOOL=$(usex fuzzing) |
47 |
-DENABLE_MAN:BOOL=OFF |
48 |
@@ -77,5 +78,6 @@ src_configure() { |
49 |
|
50 |
src_install() { |
51 |
cmake_src_install |
52 |
+ dostrip -x /usr/bin/bpftrace |
53 |
doman man/man8/*.? |
54 |
} |