linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block
@ 2022-08-17 18:54 Nathan Chancellor
  2022-08-17 22:08 ` Nick Desaulniers
  2022-08-18  7:49 ` Peter Zijlstra
  0 siblings, 2 replies; 8+ messages in thread
From: Nathan Chancellor @ 2022-08-17 18:54 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86
  Cc: Peter Zijlstra, Nick Desaulniers, linux-kernel, llvm, Nathan Chancellor

LLVM 16 will have support for this flag so move it out of the GCC-only
block to allow LLVM builds to take advantage of it.

Link: https://github.com/ClangBuiltLinux/linux/issues/1665
Link: https://github.com/llvm/llvm-project/commit/6f867f9102838ebe314c1f3661fdf95700386e5a
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---

I was not sure if this information is relevant for the commit message
but I can boot without any issues on my test machines (two Intel and one
AMD).

 arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 7854685c5f25..987da87c7778 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -14,13 +14,13 @@ endif
 
 ifdef CONFIG_CC_IS_GCC
 RETPOLINE_CFLAGS	:= $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
-RETPOLINE_CFLAGS	+= $(call cc-option,-mindirect-branch-cs-prefix)
 RETPOLINE_VDSO_CFLAGS	:= $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
 endif
 ifdef CONFIG_CC_IS_CLANG
 RETPOLINE_CFLAGS	:= -mretpoline-external-thunk
 RETPOLINE_VDSO_CFLAGS	:= -mretpoline
 endif
+RETPOLINE_CFLAGS	+= $(call cc-option,-mindirect-branch-cs-prefix)
 
 ifdef CONFIG_RETHUNK
 RETHUNK_CFLAGS		:= -mfunction-return=thunk-extern

base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-06 17:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17 18:54 [PATCH] x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block Nathan Chancellor
2022-08-17 22:08 ` Nick Desaulniers
2022-08-18  7:45   ` Peter Zijlstra
2022-08-18  8:00     ` Peter Zijlstra
2022-09-30 18:10     ` Nick Desaulniers
2022-10-04 21:27     ` Nick Desaulniers
2022-10-06 17:56       ` Nick Desaulniers
2022-08-18  7:49 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).