[PATCH v6 bpf-next 10/10] kbuild, bpf: Specify "kind_layout" optional feature

Alan Maguire
2025-12-10T20:34:39Z

The "kind_layout" feature will add metadata about BTF kinds to the
generated BTF; its absence in pahole will not trigger an error so it
is safe to add unconditionally as it will simply be ignored if pahole
does not support it.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
scripts/Makefile.btf | 2 ++
1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf
index db76335dd917..c20f9bbcabeb 100644
--- a/scripts/Makefile.btf
+++ b/scripts/Makefile.btf
@@ -25,6 +25,8 @@ pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j$(JOBS) --btf_features=enc

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

+pahole-flags-$(call test-ge, $(pahole-ver), 131) += --btf_features=kind_layout
+
ifneq ($(KBUILD_EXTMOD),)
module-pahole-flags-$(call test-ge, $(pahole-ver), 128) += --btf_features=distilled_base
endif
--
2.43.5