Skip to contentSkip to conversation

x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block

PATCH RESEND Applied Nathan Chancellor 2 participants 2 messages Jan 20, 2023 – Jan 22, 2023 x86

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block

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.

---

I picked up the tags on the previous patch but otherwise, this is indentical to the original posting:

https://lore.kernel.org/[email protected]/

 arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Makefile +1 -1
index 9cf07322875a..73ed982d4100 100644
@@ -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: 5dc4c995db9eb45f6373a956eb1f69460e69e6d4

Signature · 1 line
2.39.1
#1 lore raw
The following commit has been merged into the x86/urgent branch of tip:

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     27b5de622ea3fe0ad5a31a0ebd9f7a0a276932d1
Gitweb:        https://git.kernel.org/tip/27b5de622ea3fe0ad5a31a0ebd9f7a0a276932d1
Author:        Nathan Chancellor <[email protected]>
AuthorDate:    Fri, 20 Jan 2023 09:58:27 -07:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Sun, 22 Jan 2023 11:36:45 +01:00

x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block

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.

---
 arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Makefile +1 -1
index 9cf0732..73ed982 100644
@@ -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