aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2024-05-20 10:21:14 +0200
committerIngo Molnar <[email protected]>2024-05-21 10:17:01 +0200
commit47ff30cc1be7bf426c03ecc84371452109b416e4 (patch)
tree1b50aaba3ff1cc0c91dc93c74e3b7eb136fc05c1
parent9130ea06163fc229665b9ec4666de9f4ef68284d (diff)
x86/percpu: Enable named address spaces for all capable GCC versions
Enable named address spaces also for GCC 6, GCC 7 and GCC 8 releases. These compilers all produce kernel images that boot without problems. Use compile-time test to detect compiler support for named address spaces. The test passes with GCC 6 as the earliest compiler version where the support for named address spaces was introduced. Signed-off-by: Uros Bizjak <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--arch/x86/Kconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9d16fee6bdb8..c9e0a54f469e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2430,7 +2430,8 @@ source "kernel/livepatch/Kconfig"
endmenu
config CC_HAS_NAMED_AS
- def_bool CC_IS_GCC && GCC_VERSION >= 90100
+ def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x c - -S -o /dev/null)
+ depends on CC_IS_GCC
config CC_HAS_NAMED_AS_FIXED_SANITIZERS
def_bool CC_IS_GCC && GCC_VERSION >= 130300