The previous patch makes CONFIG_DEBUG_INFO_BTF require pahole v1.24, so CONFIG_PAHOLE_HAS_LANG_EXCLUDE (pahole v1.24) is always set with CONFIG_DEBUG_INFO_BTF. Remove it. CONFIG_RUST now depends on !CONFIG_DEBUG_INFO_BTF || !CONFIG_LTO, and scripts/Makefile.btf, which is only included with CONFIG_DEBUG_INFO_BTF, always passes --lang_exclude=rust. The pahole flags and the resulting config are unchanged, except that CONFIG_PAHOLE_HAS_LANG_EXCLUDE is gone. Acked-by: Alan Maguire Signed-off-by: Yonghong Song --- init/Kconfig | 2 +- lib/Kconfig.debug | 9 --------- scripts/Makefile.btf | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index c8a7cfa60a6e..ca7f20462d0c 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2065,7 +2065,7 @@ config RUST depends on !MODVERSIONS || GENDWARFKSYMS depends on !GCC_PLUGIN_RANDSTRUCT depends on !RANDSTRUCT - depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO) + depends on !DEBUG_INFO_BTF || !LTO depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC select CFI_ICALL_NORMALIZE_INTEGERS if CFI depends on !KASAN || CC_IS_CLANG diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 9479034afe5a..1d35a99d6cb5 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -416,15 +416,6 @@ config PAHOLE_HAS_BTF_TAG btf_decl_tag) or not. Currently only clang compiler implements these attributes, so make the config depend on CC_IS_CLANG. -config PAHOLE_HAS_LANG_EXCLUDE - def_bool PAHOLE_VERSION >= 124 - help - Support for the --lang_exclude flag which makes pahole exclude - compilation units from the supplied language. Used in Kbuild to - omit Rust CUs which are not supported in version 1.24 of pahole, - otherwise it would emit malformed kernel and module binaries when - using DEBUG_INFO_BTF_MODULES. - config PAHOLE_HAS_INLINE def_bool PAHOLE_VERSION >= 132 help diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf index 02ff1702e1e8..8cd8c88d4580 100644 --- a/scripts/Makefile.btf +++ b/scripts/Makefile.btf @@ -20,7 +20,7 @@ pahole-flags-$(call test-ge, $(pahole-ver), 131) += --btf_features=layout endif -pahole-flags-$(CONFIG_PAHOLE_HAS_LANG_EXCLUDE) += --lang_exclude=rust +pahole-flags-y += --lang_exclude=rust btf-inline := $(CONFIG_DEBUG_INFO_BTF_INLINE) ifneq ($(btf-inline),) -- 2.53.1-Meta