Commit | Line | Data |
---|---|---|
9741e07e JO |
1 | #!/bin/sh |
2 | # SPDX-License-Identifier: GPL-2.0 | |
3 | ||
4 | extra_paholeopt= | |
5 | ||
6 | if ! [ -x "$(command -v ${PAHOLE})" ]; then | |
fc02cb2b | 7 | exit 0 |
9741e07e JO |
8 | fi |
9 | ||
2d6c9810 | 10 | pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE}) |
9741e07e JO |
11 | |
12 | if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then | |
13 | # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars | |
14 | extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars" | |
15 | fi | |
16 | if [ "${pahole_ver}" -ge "121" ]; then | |
17 | extra_paholeopt="${extra_paholeopt} --btf_gen_floats" | |
18 | fi | |
b4f72786 KFL |
19 | if [ "${pahole_ver}" -ge "122" ]; then |
20 | extra_paholeopt="${extra_paholeopt} -j" | |
21 | fi | |
c1177979 MRR |
22 | if [ "${pahole_ver}" -ge "124" ]; then |
23 | # see PAHOLE_HAS_LANG_EXCLUDE | |
24 | extra_paholeopt="${extra_paholeopt} --lang_exclude=rust" | |
25 | fi | |
7b99f759 AM |
26 | if [ "${pahole_ver}" -ge "125" ]; then |
27 | extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized" | |
28 | fi | |
9741e07e JO |
29 | |
30 | echo ${extra_paholeopt} |