diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-04-19 21:24:04 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-04-21 20:12:25 +0000 |
commit | 0d504c8c0fb8f5dc2ab54e679eeb2b2ec313c59c (patch) | |
tree | 7b7b96eb71ce78d9bb8248a1628c8b9dd9c88232 /src/arch/riscv | |
parent | 43c730f98644a984980065b1e924124c24b6253d (diff) |
arch/riscv: Fix compiler argument for clang
The suffixes zicsr and zifencei are assumed by default for clang.
Change-Id: I75947f614c3600d5d9d461970159f0787fd6c3de
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74568
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'src/arch/riscv')
-rw-r--r-- | src/arch/riscv/Makefile.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc index bbbdeb07f1..cc553c938d 100644 --- a/src/arch/riscv/Makefile.inc +++ b/src/arch/riscv/Makefile.inc @@ -25,15 +25,21 @@ endif # suffixes in ARCH_SUFFIX_riscv. simple_riscv_flags = $(riscv_flags) +ifeq ($(CONFIG_COMPILER_GCC),y) +MARCH_SUFFIX=$(ARCH_SUFFIX_riscv) +else +MARCH_SUFFIX= +endif + ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),) -riscv_flags += -march=$(CONFIG_RISCV_ARCH)$(ARCH_SUFFIX_riscv) -mabi=$(CONFIG_RISCV_ABI) -mcmodel=$(CONFIG_RISCV_CODEMODEL) +riscv_flags += -march=$(CONFIG_RISCV_ARCH)$(MARCH_SUFFIX) -mabi=$(CONFIG_RISCV_ABI) -mcmodel=$(CONFIG_RISCV_CODEMODEL) simple_riscv_flags += -march=$(CONFIG_RISCV_ARCH) -mabi=$(CONFIG_RISCV_ABI) -mcmodel=$(CONFIG_RISCV_CODEMODEL) else riscv_flags += $(_rv_flags) simple_riscv_flags += $(_rv_flags) endif -riscv_asm_flags = -march=$(CONFIG_RISCV_ARCH)$(ARCH_SUFFIX_riscv) -mabi=$(CONFIG_RISCV_ABI) +riscv_asm_flags = -march=$(CONFIG_RISCV_ARCH)$(MARCH_SUFFIX) -mabi=$(CONFIG_RISCV_ABI) COMPILER_RT_bootblock = $(shell $(GCC_bootblock) $(simple_riscv_flags) -print-libgcc-file-name) |