aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-12-17 13:00:30 +0100
committerClifford Wolf <clifford@clifford.at>2016-12-17 13:00:30 +0100
commit55da6c7cd1f5ad798bfa0f52989434486c03b31b (patch)
tree2b76f8ff61cd35afa9e4360cd738ca3c83ac8a2d
parent56dc5b3549e53f9b317c240d2bd7c154ee94a1c9 (diff)
downloadpicorv32-55da6c7cd1f5ad798bfa0f52989434486c03b31b.tar.gz
picorv32-55da6c7cd1f5ad798bfa0f52989434486c03b31b.zip
Some build fixes for new riscv-gnu-toolchain
-rw-r--r--Makefile8
-rw-r--r--dhrystone/Makefile2
2 files changed, 5 insertions, 5 deletions
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)