[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190415215839.1895340-1-andrii.nakryiko@gmail.com>
Date: Mon, 15 Apr 2019 14:58:39 -0700
From: <andrii.nakryiko@...il.com>
To: <andrii.nakryiko@...il.com>, <netdev@...r.kernel.org>,
<bpf@...r.kernel.org>, <kernel-team@...com>, <davem@...emloft.net>
CC: Andrii Nakryiko <andriin@...com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...com>, Yonghong Song <yhs@...com>,
Martin KaFai Lau <kafai@...com>
Subject: [PATCH bpf-next] kbuild: handle old pahole more gracefully when generating BTF
From: Andrii Nakryiko <andriin@...com>
When CONFIG_DEBUG_INFO_BTF is enabled but available version of pahole is too
old to support BTF generation, build script is supposed to emit warning and
proceed with the build. Due to using exit instead of return from BASH function,
existing handling code prematurely exits exit code 0, not completing some of
the build steps. This patch fixes issue by correctly returning just from
gen_btf() function only.
Fixes: e83b9f55448a ("kbuild: add ability to generate BTF type info for vmlinux")
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Daniel Borkmann <daniel@...earbox.net>
Cc: Alexei Starovoitov <ast@...com>
Cc: Yonghong Song <yhs@...com>
Cc: Martin KaFai Lau <kafai@...com>
Signed-off-by: Andrii Nakryiko <andriin@...com>
---
scripts/link-vmlinux.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index dd2b31ccca6a..6a148d0d51bf 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -99,7 +99,7 @@ gen_btf()
pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
if [ "${pahole_ver}" -lt "113" ]; then
info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
- exit 0
+ return 0
fi
info "BTF" ${1}
--
2.17.1
Powered by blists - more mailing lists