diff options
author | Peter Zijlstra <peterz@infradead.org> | 2018-01-17 11:42:07 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-03-20 10:58:02 +0100 |
commit | e501ce957a786ecd076ea0cfb10b114e6e4d0f40 (patch) | |
tree | 93beb08eb9a78f81c80866baf25f7472df35b955 /arch/x86/Makefile | |
parent | edc39c9b4589a4ce9a69273b5a27a1459c3423d4 (diff) |
x86: Force asm-goto
We want to start using asm-goto to guarantee the absence of dynamic
branches (and thus speculation).
A primary prerequisite for this is of course that the compiler
supports asm-goto. This effecively lifts the minimum GCC version to
build an x86 kernel to gcc-4.5.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: torvalds@linux-foundation.org
Link: https://lkml.kernel.org/r/20180319201327.GJ4043@hirez.programming.kicks-ass.net
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r-- | arch/x86/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 498c1b812300..d798e36d103c 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -181,6 +181,10 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER endif endif +ifndef CC_HAVE_ASM_GOTO + $(error Compiler lacks asm-goto support.) +endif + # # Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a # GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226). There's no way |