scripts/Makefile.btf

Source file repositories/reference/linux-study-clean/scripts/Makefile.btf

File Facts

System
Linux kernel
Corpus path
scripts/Makefile.btf
Extension
.btf
Size
1160 bytes
Lines
35
Domain
Support Tooling And Documentation
Bucket
scripts
Inferred role
Support Tooling And Documentation: build/configuration rule
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0

pahole-ver := $(CONFIG_PAHOLE_VERSION)
pahole-flags-y :=

JOBS := $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))

ifeq ($(call test-le, $(pahole-ver), 125),y)

pahole-flags-y                                  	+= --btf_gen_floats -j$(JOBS)

pahole-flags-$(call test-ge, $(pahole-ver), 125)	+= --skip_encoding_btf_inconsistent_proto --btf_gen_optimized

else

# Switch to using --btf_features for v1.26 and later.
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

pahole-flags-$(call test-ge, $(pahole-ver), 130) += --btf_features=attributes

pahole-flags-$(call test-ge, $(pahole-ver), 131) += --btf_features=layout

endif

pahole-flags-$(CONFIG_PAHOLE_HAS_LANG_EXCLUDE)		+= --lang_exclude=rust

export PAHOLE_FLAGS := $(pahole-flags-y)

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)

Annotation

Implementation Notes