Skip to content

Commit 27b5de6

Browse files
nathanchanceingomolnar
authored andcommitted
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. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: ClangBuiltLinux#1665 Link: llvm/llvm-project@6f867f9 Link: https://lore.kernel.org/r/20230120165826.2469302-1-nathan@kernel.org
1 parent fe0ba8c commit 27b5de6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ endif
1414

1515
ifdef CONFIG_CC_IS_GCC
1616
RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
17-
RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
1817
RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
1918
endif
2019
ifdef CONFIG_CC_IS_CLANG
2120
RETPOLINE_CFLAGS := -mretpoline-external-thunk
2221
RETPOLINE_VDSO_CFLAGS := -mretpoline
2322
endif
23+
RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
2424

2525
ifdef CONFIG_RETHUNK
2626
RETHUNK_CFLAGS := -mfunction-return=thunk-extern

0 commit comments

Comments
 (0)