Re: [PATCH bpf-next] kbuild: handle old pahole more gracefully when generating BTF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Apr 15, 2019, at 2:58 PM, andrii.nakryiko@xxxxxxxxx wrote:
> 
> From: Andrii Nakryiko <andriin@xxxxxx>
> 
> 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@xxxxxxxxxxxxx>
> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
> Cc: Alexei Starovoitov <ast@xxxxxx>
> Cc: Yonghong Song <yhs@xxxxxx>
> Cc: Martin KaFai Lau <kafai@xxxxxx>
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>


> ---
> 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
> 





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux