summaryrefslogtreecommitdiff
path: root/arch/riscv/purgatory
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2023-07-10 18:35:50 +0000
committerPalmer Dabbelt <palmer@rivosinc.com>2023-08-23 14:16:40 -0700
commita72ab0361110db51488c670863551eb01428470e (patch)
treea498c28115e547e44591c3e111650bedce06322b /arch/riscv/purgatory
parentaf0ead42f69389cd4ed68e1a4c6cde45c0adb35c (diff)
riscv/purgatory: Disable CFI
Filter out CC_FLAGS_CFI when CONFIG_CFI_CLANG. Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20230710183544.999540-13-samitolvanen@google.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/purgatory')
-rw-r--r--arch/riscv/purgatory/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile
index dc20e166983e..9e6476719abb 100644
--- a/arch/riscv/purgatory/Makefile
+++ b/arch/riscv/purgatory/Makefile
@@ -77,6 +77,10 @@ ifdef CONFIG_STACKPROTECTOR_STRONG
PURGATORY_CFLAGS_REMOVE += -fstack-protector-strong
endif
+ifdef CONFIG_CFI_CLANG
+PURGATORY_CFLAGS_REMOVE += $(CC_FLAGS_CFI)
+endif
+
CFLAGS_REMOVE_purgatory.o += $(PURGATORY_CFLAGS_REMOVE)
CFLAGS_purgatory.o += $(PURGATORY_CFLAGS)