diff --git a/Makefile b/Makefile index 869150a..8afb2b3 100644 --- a/Makefile +++ b/Makefile @@ -63,19 +63,19 @@ firmware/firmware.bin: firmware/firmware.elf chmod -x $@ firmware/firmware.elf: $(FIRMWARE_OBJS) $(TEST_OBJS) firmware/sections.lds - $(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o $@ \ + $(TOOLCHAIN_PREFIX)gcc -Os -ffreestanding -nostdlib -o $@ \ -Wl,-Bstatic,-T,firmware/sections.lds,-Map,firmware/firmware.map,--strip-debug \ $(FIRMWARE_OBJS) $(TEST_OBJS) -lgcc chmod -x $@ firmware/start.o: firmware/start.S - $(TOOLCHAIN_PREFIX)gcc -c -m32 -march=RV32IM$(COMPRESSED_ISA) -o $@ $< + $(TOOLCHAIN_PREFIX)gcc -c -march=rv32im$(subst C,c,$(COMPRESSED_ISA)) -o $@ $< firmware/%.o: firmware/%.c - $(TOOLCHAIN_PREFIX)gcc -c -m32 -march=RV32I$(COMPRESSED_ISA) -Os --std=c99 $(GCC_WARNS) -ffreestanding -nostdlib -o $@ $< + $(TOOLCHAIN_PREFIX)gcc -c -march=rv32i$(subst C,c,$(COMPRESSED_ISA)) -Os --std=c99 $(GCC_WARNS) -ffreestanding -nostdlib -o $@ $< tests/%.o: tests/%.S tests/riscv_test.h tests/test_macros.h - $(TOOLCHAIN_PREFIX)gcc -c -m32 -march=RV32IM -o $@ -DTEST_FUNC_NAME=$(notdir $(basename $<)) \ + $(TOOLCHAIN_PREFIX)gcc -c -march=rv32im -o $@ -DTEST_FUNC_NAME=$(notdir $(basename $<)) \ -DTEST_FUNC_TXT='"$(notdir $(basename $<))"' -DTEST_FUNC_RET=$(notdir $(basename $<))_ret $< download-tools: diff --git a/dhrystone/Makefile b/dhrystone/Makefile index 3b282f0..5dab684 100644 --- a/dhrystone/Makefile +++ b/dhrystone/Makefile @@ -1,6 +1,6 @@ USE_MYSTDLIB = 0 OBJS = dhry_1.o dhry_2.o stdlib.o -CFLAGS = -MD -O3 -m32 -march=RV32IM -DTIME -DRISCV +CFLAGS = -MD -O3 -march=rv32im -DTIME -DRISCV TOOLCHAIN_PREFIX = /opt/riscv32im/bin/riscv32-unknown-elf- ifeq ($(USE_MYSTDLIB),1)