arch/riscv: Fix makefile to only set flags for riscv

This was updating flags for ALL architectures, not just riscv.
That was bad, and gave us errors, although they weren't fatal for
some reason:
i386-elf-gcc: error: missing argument to '-mcmodel='
i386-elf-gcc: error: missing argument to '-march='
i386-elf-gcc: error: missing argument to '-mabi='

This issue started from commit 5fed693a (riscv: add support for
modifying compiler options)

Add comments to the other 'endif' statements since they're now
surrounded by a global ifeq

Change-Id: Ifa12ad98b04a5ac36148609ccdf46ca427fc5a27
Signed-off-by: Martin Roth <martin@coreboot.org>
Reviewed-on: https://review.coreboot.org/27535
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Martin Roth 2018-07-18 12:03:48 -06:00 committed by Martin Roth
parent eeb83b6b53
commit 202e7d4f3c
1 changed files with 5 additions and 3 deletions

View File

@ -18,6 +18,7 @@
################################################################################
## RISC-V specific options
################################################################################
ifeq ($(CONFIG_ARCH_RISCV),y)
ifeq ($(CONFIG_ARCH_RAMSTAGE_RISCV),y)
check-ramstage-overlap-regions += stack
@ -64,7 +65,7 @@ $(objcbfs)/bootblock.debug: $$(bootblock-objs)
bootblock-c-ccopts += $(riscv_flags)
bootblock-S-ccopts += $(riscv_asm_flags)
endif
endif #CONFIG_ARCH_BOOTBLOCK_RISCV
################################################################################
## romstage
@ -92,7 +93,7 @@ $(objcbfs)/romstage.debug: $$(romstage-objs)
romstage-c-ccopts += $(riscv_flags)
romstage-S-ccopts += $(riscv_asm_flags)
endif
endif #CONFIG_ARCH_ROMSTAGE_RISCV
################################################################################
## ramstage
@ -128,4 +129,5 @@ $(objcbfs)/ramstage.debug: $$(ramstage-objs)
ramstage-c-ccopts += $(riscv_flags)
ramstage-S-ccopts += $(riscv_asm_flags)
endif
endif #CONFIG_ARCH_RAMSTAGE_RISCV
endif #CONFIG_ARCH_RISCV