blob: e6093adf4c06d7cb7430105ab05fee058dc9511e [file] [log] [blame]
Jiri Olsa9741e072021-10-29 14:57:29 +02001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4extra_paholeopt=
5
6if ! [ -x "$(command -v ${PAHOLE})" ]; then
Linus Torvaldsfc02cb22021-11-02 06:20:58 -07007 exit 0
Jiri Olsa9741e072021-10-29 14:57:29 +02008fi
9
10pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
11
12if [ "${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"
15fi
16if [ "${pahole_ver}" -ge "121" ]; then
17 extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
18fi
19
20echo ${extra_paholeopt}