[PATCH v2 1/6] scripts/Kconfig.toolchain: Remove CONFIG_CC_HAS_NO_PROFILE_FN_ATTR
From: Nathan Chancellor
Date: Wed Nov 11 2026 - 19:55:15 EST
__attribute__((no_profile_instrument_function)) was first supported in
GCC 7 and clang-13, which is higher than both the minimum supported
versions of both compilers. This configuration is always 'y', thus it
can be removed.
Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
---
kernel/gcov/Kconfig | 1 -
scripts/Kconfig.toolchain | 3 ---
2 files changed, 4 deletions(-)
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
index 04f4ebdc3cf5..f62de2dea8a3 100644
--- a/kernel/gcov/Kconfig
+++ b/kernel/gcov/Kconfig
@@ -4,7 +4,6 @@ menu "GCOV-based kernel profiling"
config GCOV_KERNEL
bool "Enable gcov-based kernel profiling"
depends on DEBUG_FS
- depends on !ARCH_WANTS_NO_INSTR || CC_HAS_NO_PROFILE_FN_ATTR
select CONSTRUCTORS
default n
help
diff --git a/scripts/Kconfig.toolchain b/scripts/Kconfig.toolchain
index 2acbd40a38f1..666d44cc6ba8 100644
--- a/scripts/Kconfig.toolchain
+++ b/scripts/Kconfig.toolchain
@@ -141,9 +141,6 @@ config CC_HAS_ASSUME
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106654
default y if CC_IS_GCC && GCC_VERSION >= 130100
-config CC_HAS_NO_PROFILE_FN_ATTR
- def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)
-
# Beware of two problems when using cc-option in Kconfig compared to Kbuild
#
# 1. cc-option in Kbuild tests the provided flags with all previously added
--
2.56.0