Jiri Olsa | 9741e07 | 2021-10-29 14:57:29 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | |
| 4 | extra_paholeopt= |
| 5 | |
| 6 | if ! [ -x "$(command -v ${PAHOLE})" ]; then |
Linus Torvalds | fc02cb2 | 2021-11-02 06:20:58 -0700 | [diff] [blame] | 7 | exit 0 |
Jiri Olsa | 9741e07 | 2021-10-29 14:57:29 +0200 | [diff] [blame] | 8 | fi |
| 9 | |
| 10 | pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') |
| 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 |
| 19 | |
| 20 | echo ${extra_paholeopt} |