X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=arch%2Fx86%2FMakefile;h=a587805c6687f6721ae8140da8144701c9abb49b;hb=7a74198f587b3cfd5c4c5fe3cb8b46188c9ae02d;hp=2d8b9d8ca4f8753291bb1487fb0b77d7b6009280;hpb=31ef489a026ef2c07383ef336dc9b6601c7b9b93;p=thirdparty%2Fkernel%2Fstable.git diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 2d8b9d8ca4f87..a587805c6687f 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -219,8 +219,12 @@ ifdef CONFIG_RETPOLINE # Additionally, avoid generating expensive indirect jumps which # are subject to retpolines for small number of switch cases. # clang turns off jump table generation by default when under - # retpoline builds, however, gcc does not for x86. - KBUILD_CFLAGS += $(call cc-option,--param=case-values-threshold=20) + # retpoline builds, however, gcc does not for x86. This has + # only been fixed starting from gcc stable version 8.4.0 and + # onwards, but not for older ones. See gcc bug #86952. + ifndef CONFIG_CC_IS_CLANG + KBUILD_CFLAGS += $(call cc-option,-fno-jump-tables) + endif endif archscripts: scripts_basic