mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-libs/libcap-ng: check for BTF kernel info with USE=bpf
Closes: https://bugs.gentoo.org/972898 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/681 Merges: https://codeberg.org/gentoo/gentoo/pulls/681 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
54385759ea
commit
e4dce9e787
@@ -42,6 +42,18 @@ PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.9.3-audit-out-of-source-build.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
# bug 972898
|
||||
if use bpf && [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
if [[ ! -f /sys/kernel/btf/vmlinux ]] ; then
|
||||
local err="Cannot read /sys/kernel/btf/vmlinux, which is required by bpftool.\n"
|
||||
err+=" Typically this means that your kernel is missing the DEBUG_INFO_BTF option,\n"
|
||||
err+=" without which BPF cannot work. Please build with USE=-bpf or reconfigure your kernel."
|
||||
die "${err}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
|
||||
Reference in New Issue
Block a user