mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 05:24:47 +08:00
0f59e08070
commit 2d6c9810eb
upstream.
Use pahole-version.sh to get pahole's version code to reduce the amount
of duplication across the tree.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220201205624.652313-4-nathan@kernel.org
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 lines
610 B
Bash
Executable File
25 lines
610 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
extra_paholeopt=
|
|
|
|
if ! [ -x "$(command -v ${PAHOLE})" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE})
|
|
|
|
if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
|
|
# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
|
|
fi
|
|
if [ "${pahole_ver}" -ge "121" ]; then
|
|
extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
|
|
fi
|
|
|
|
if [ "${pahole_ver}" -ge "124" ]; then
|
|
extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
|
|
fi
|
|
|
|
echo ${extra_paholeopt}
|