Skip to content

Commit 47ff30c

Browse files
ubizjakIngo Molnar
authored andcommitted
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]
1 parent 9130ea0 commit 47ff30c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,8 @@ source "kernel/livepatch/Kconfig"
24302430
endmenu
24312431

24322432
config CC_HAS_NAMED_AS
2433-
def_bool CC_IS_GCC && GCC_VERSION >= 90100
2433+
def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x c - -S -o /dev/null)
2434+
depends on CC_IS_GCC
24342435

24352436
config CC_HAS_NAMED_AS_FIXED_SANITIZERS
24362437
def_bool CC_IS_GCC && GCC_VERSION >= 130300

0 commit comments

Comments
 (0)