mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
x86/retpolines: Fix up backport of a9d57ef15c
Commita9d57ef15c
("x86/retpolines: Disable switch jump tables when retpolines are enabled") added -fno-jump-tables to workaround a GCC issue while deliberately avoiding adding this flag when CONFIG_CC_IS_CLANG is set, which is defined by the kconfig system when CC=clang is provided. However, this symbol was added in 4.18 in commit469cb7376c
("kconfig: add CC_IS_CLANG and CLANG_VERSION") so it is always undefined in 4.14, meaning -fno-jump-tables gets added when using Clang. Fix this up by using the equivalent $(cc-name) comparison, which matches what upstream did until commit076f421da5
("kbuild: replace cc-name test with CONFIG_CC_IS_CLANG"). Fixes:e289511005
("x86/retpolines: Disable switch jump tables when retpolines are enabled") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2d76dd0e17
commit
32c2a4de71
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ ifdef CONFIG_RETPOLINE
|
|||
# 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
|
||||
ifneq ($(cc-name), clang)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-jump-tables)
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue