Skip to content

Commit 2a67a6c

Browse files
cdownborkmann
authored andcommitted
bpf, btf: Always output invariant hit in pahole DWARF to BTF transform
When trying to compile with CONFIG_DEBUG_INFO_BTF enabled, I got this error: % make -s Failed to generate BTF for vmlinux Try to disable CONFIG_DEBUG_INFO_BTF make[3]: *** [vmlinux] Error 1 Compiling again without -s shows the true error (that pahole is missing), but since this is fatal, we should show the error unconditionally on stderr as well, not silence it using the `info` function. With this patch: % make -s BTF: .tmp_vmlinux.btf: pahole (pahole) is not available Failed to generate BTF for vmlinux Try to disable CONFIG_DEBUG_INFO_BTF make[3]: *** [vmlinux] Error 1 Signed-off-by: Chris Down <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 1222653 commit 2a67a6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/link-vmlinux.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ gen_btf()
108108
local bin_arch
109109

110110
if ! [ -x "$(command -v ${PAHOLE})" ]; then
111-
info "BTF" "${1}: pahole (${PAHOLE}) is not available"
111+
echo >&2 "BTF: ${1}: pahole (${PAHOLE}) is not available"
112112
return 1
113113
fi
114114

115115
pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
116116
if [ "${pahole_ver}" -lt "113" ]; then
117-
info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
117+
echo >&2 "BTF: ${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
118118
return 1
119119
fi
120120

0 commit comments

Comments
 (0)