From 202e7d4f3c50bfac53d06eaf0b0b1247f4c95be8 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 18 Jul 2018 12:03:48 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/27535 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/arch/riscv/Makefile.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/arch/riscv') diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc index 90e4240468..dab661eb8d 100644 --- a/src/arch/riscv/Makefile.inc +++ b/src/arch/riscv/Makefile.inc @@ -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 -- cgit v1.2.3