diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-06-11 16:29:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-06-11 16:29:53 -0700 |
commit | 548843c096d08b6c24d2aa1b73783da37c96bb0a (patch) | |
tree | 3496914c5a726afcf5c46a2e07088d291d284a0c | |
parent | e65b7914b2abfff4fde9dcca22bbab99fab5ba05 (diff) | |
parent | 2398ce80152aae33b9501ef54452e09e8e8d4262 (diff) | |
download | linux-548843c096d08b6c24d2aa1b73783da37c96bb0a.tar.bz2 |
Merge tag 'clang-features-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull clang LTO fix from Kees Cook:
"Clang 13 fixed some IR behavior for LTO, but this broke work-arounds
used in the kernel.
Handle changes to needed LTO flags in Clang 13 (Tor Vic)"
* tag 'clang-features-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
x86, lto: Pass -stack-alignment only on LLD < 13.0.0
-rw-r--r-- | arch/x86/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 307529417021..cb5e8d39cac1 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -200,8 +200,9 @@ endif KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE) ifdef CONFIG_LTO_CLANG -KBUILD_LDFLAGS += -plugin-opt=-code-model=kernel \ - -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8) +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 130000; echo $$?),0) +KBUILD_LDFLAGS += -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8) +endif endif ifdef CONFIG_X86_NEED_RELOCS |