Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80448?usp=email )
Change subject: [WIP] arch/riscv/Makefile.inc: Remove libgcc.a dependency ......................................................................
[WIP] arch/riscv/Makefile.inc: Remove libgcc.a dependency
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com Change-Id: Ic0be7879630190ab3b150bb3264ea122d9ca3d48 --- M src/arch/riscv/Makefile.mk 1 file changed, 5 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/80448/1
diff --git a/src/arch/riscv/Makefile.mk b/src/arch/riscv/Makefile.mk index bbd3959..7ab600a 100644 --- a/src/arch/riscv/Makefile.mk +++ b/src/arch/riscv/Makefile.mk @@ -9,8 +9,6 @@ check-ramstage-overlap-regions += stack endif
-riscv_flags = -I$(src)/arch/riscv/ - ifeq ($(CONFIG_ARCH_RISCV_RV64),y) _rv_flags += -D__riscv -D__riscv_xlen=64 -D__riscv_flen=64 else @@ -21,32 +19,22 @@ endif endif
-# Needed for -print-libgcc-file-name which gets confused about all those arch -# suffixes in ARCH_SUFFIX_riscv. -simple_riscv_flags = $(riscv_flags) - ifeq ($(CONFIG_COMPILER_GCC),y) MARCH_SUFFIX=$(ARCH_SUFFIX_riscv) else MARCH_SUFFIX= endif
+riscv_flags = -I$(src)/arch/riscv/ + ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),) 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)$(MARCH_SUFFIX) -mabi=$(CONFIG_RISCV_ABI)
-COMPILER_RT_bootblock = $(shell $(GCC_bootblock) $(simple_riscv_flags) -print-libgcc-file-name) - -COMPILER_RT_romstage = $(shell $(GCC_romstage) $(simple_riscv_flags) -print-libgcc-file-name) - -COMPILER_RT_ramstage = $(shell $(GCC_ramstage) $(simple_riscv_flags) -print-libgcc-file-name) - ## All stages
all-y += trap_util.S @@ -80,7 +68,7 @@ @printf " LINK $(subst $(obj)/,,$(@))\n" $(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) \ -T $(call src-to-obj,bootblock,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) \ - $(LIBGCC_FILE_NAME_bootblock) --end-group $(COMPILER_RT_bootblock) + $(LIBGCC_FILE_NAME_bootblock) --end-group
bootblock-c-ccopts += $(riscv_flags) bootblock-S-ccopts += $(riscv_asm_flags) @@ -102,7 +90,7 @@
$(objcbfs)/romstage.debug: $$(romstage-objs) @printf " LINK $(subst $(obj)/,,$(@))\n" - $(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group $(COMPILER_RT_romstage) + $(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group
romstage-c-ccopts += $(riscv_flags) romstage-S-ccopts += $(riscv_asm_flags) @@ -132,7 +120,7 @@
$(objcbfs)/ramstage.debug: $$(ramstage-objs) @printf " CC $(subst $(obj)/,,$(@))\n" - $(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group $(COMPILER_RT_ramstage) + $(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group
ramstage-c-ccopts += $(riscv_flags) ramstage-S-ccopts += $(riscv_asm_flags)