aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 2d8b9d8ca4f8..a587805c6687 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -219,8 +219,12 @@ ifdef CONFIG_RETPOLINE
219 # Additionally, avoid generating expensive indirect jumps which 219 # Additionally, avoid generating expensive indirect jumps which
220 # are subject to retpolines for small number of switch cases. 220 # are subject to retpolines for small number of switch cases.
221 # clang turns off jump table generation by default when under 221 # clang turns off jump table generation by default when under
222 # retpoline builds, however, gcc does not for x86. 222 # retpoline builds, however, gcc does not for x86. This has
223 KBUILD_CFLAGS += $(call cc-option,--param=case-values-threshold=20) 223 # only been fixed starting from gcc stable version 8.4.0 and
224 # onwards, but not for older ones. See gcc bug #86952.
225 ifndef CONFIG_CC_IS_CLANG
226 KBUILD_CFLAGS += $(call cc-option,-fno-jump-tables)
227 endif
224endif 228endif
225 229
226archscripts: scripts_basic 230archscripts: scripts_basic