| # SPDX-License-Identifier: GPL-2.0 |
| if ! [ -x "$(command -v ${PAHOLE})" ]; then |
| 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" |
| if [ "${pahole_ver}" -ge "121" ]; then |
| extra_paholeopt="${extra_paholeopt} --btf_gen_floats" |
| if [ "${pahole_ver}" -ge "122" ]; then |
| extra_paholeopt="${extra_paholeopt} -j" |
| if [ "${pahole_ver}" -ge "124" ]; then |
| # see PAHOLE_HAS_LANG_EXCLUDE |
| extra_paholeopt="${extra_paholeopt} --lang_exclude=rust" |
| if [ "${pahole_ver}" -ge "125" ]; then |
| extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized" |