2023-10-19 00:19:48 +09:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
|
|
pahole-ver := $(CONFIG_PAHOLE_VERSION)
|
|
|
|
|
pahole-flags-y :=
|
|
|
|
|
|
2024-11-02 11:04:51 +01:00
|
|
|
JOBS := $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
|
|
|
|
|
|
2024-05-07 14:55:14 +01:00
|
|
|
ifeq ($(call test-le, $(pahole-ver), 125),y)
|
|
|
|
|
|
2025-12-19 10:18:23 -08:00
|
|
|
pahole-flags-y += --btf_gen_floats -j$(JOBS)
|
2023-10-19 00:19:48 +09:00
|
|
|
|
2024-05-14 17:27:16 +01:00
|
|
|
pahole-flags-$(call test-ge, $(pahole-ver), 125) += --skip_encoding_btf_inconsistent_proto --btf_gen_optimized
|
2024-05-07 14:55:14 +01:00
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
# Switch to using --btf_features for v1.26 and later.
|
2024-11-02 11:04:51 +01:00
|
|
|
pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j$(JOBS) --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs
|
2024-05-07 14:55:14 +01:00
|
|
|
|
2025-04-14 11:59:18 -07:00
|
|
|
pahole-flags-$(call test-ge, $(pahole-ver), 130) += --btf_features=attributes
|
|
|
|
|
|
2026-03-26 14:54:44 +00:00
|
|
|
pahole-flags-$(call test-ge, $(pahole-ver), 131) += --btf_features=layout
|
|
|
|
|
|
2024-05-07 14:55:14 +01:00
|
|
|
endif
|
|
|
|
|
|
2023-10-19 00:19:48 +09:00
|
|
|
pahole-flags-$(CONFIG_PAHOLE_HAS_LANG_EXCLUDE) += --lang_exclude=rust
|
|
|
|
|
|
|
|
|
|
export PAHOLE_FLAGS := $(pahole-flags-y)
|
2025-12-19 10:18:25 -08:00
|
|
|
|
|
|
|
|
resolve-btfids-flags-y :=
|
|
|
|
|
resolve-btfids-flags-$(CONFIG_WERROR) += --fatal_warnings
|
|
|
|
|
resolve-btfids-flags-$(if $(KBUILD_EXTMOD),y) += --distill_base
|
|
|
|
|
resolve-btfids-flags-$(if $(KBUILD_VERBOSE),y) += --verbose
|
|
|
|
|
|
|
|
|
|
export RESOLVE_BTFIDS_FLAGS := $(resolve-btfids-flags-y)
|