aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/Makefile
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-04-30 20:45:27 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-04-30 20:45:27 -0700
commit22742246287feda0be2666ba14ca6f4a6bc73bb2 (patch)
treea15d7df63f796e13e6c28a2ec82a36f68af5c3a5 /benchmarks/Makefile
parent8dda7b2034197109a2387ac3dd03c7ad1e8c0b65 (diff)
downloadriscv-tests-22742246287feda0be2666ba14ca6f4a6bc73bb2.zip
riscv-tests-22742246287feda0be2666ba14ca6f4a6bc73bb2.tar.gz
riscv-tests-22742246287feda0be2666ba14ca6f4a6bc73bb2.tar.bz2
ERET -> xRET; new memory map
For now, we no longer build hex files, because the programs don't start at address 0. This decision will likely be revisited.
Diffstat (limited to 'benchmarks/Makefile')
-rw-r--r--benchmarks/Makefile10
1 files changed, 3 insertions, 7 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index 1145fed..8cc1e35 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -48,10 +48,10 @@ HOST_COMP = gcc $(HOST_OPTS)
RISCV_PREFIX ?= riscv64-unknown-elf-
RISCV_GCC ?= $(RISCV_PREFIX)gcc
-RISCV_GCC_OPTS ?= -static -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf
+RISCV_GCC_OPTS ?= -fpie -static -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf
RISCV_LINK ?= $(RISCV_GCC) -T $(src_dir)/common/test.ld $(incs)
RISCV_LINK_MT ?= $(RISCV_GCC) -T $(src_dir)/common/test-mt.ld
-RISCV_LINK_OPTS ?= -nostdlib -nostartfiles -ffast-math -lc -lgcc
+RISCV_LINK_OPTS ?= -nostdlib -nostartfiles -ffast-math -lgcc
RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data
RISCV_SIM ?= spike
@@ -68,15 +68,11 @@ include $(patsubst %, $(src_dir)/%/bmark.mk, $(bmarks))
bmarks_riscv_bin = $(addsuffix .riscv, $(bmarks))
bmarks_riscv_dump = $(addsuffix .riscv.dump, $(bmarks))
-bmarks_riscv_hex = $(addsuffix .riscv.hex, $(bmarks))
bmarks_riscv_out = $(addsuffix .riscv.out, $(bmarks))
bmarks_defs = -DPREALLOCATE=1 -DHOST_DEBUG=0
bmarks_cycles = 80000
-%.hex: %
- elf2hex 16 32768 $< > $@
-
$(bmarks_riscv_dump): %.riscv.dump: %.riscv
$(RISCV_OBJDUMP) $< > $@
@@ -91,7 +87,7 @@ $(bmarks_riscv_out): %.riscv.out: %.riscv
$(RISCV_GCC) $(RISCV_GCC_OPTS) $(bmarks_defs) -D__ASSEMBLY__=1 \
-c $(incs) $< -o $@
-riscv: $(bmarks_riscv_dump) $(bmarks_riscv_hex)
+riscv: $(bmarks_riscv_dump)
run-riscv: $(bmarks_riscv_out)
echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
$(bmarks_riscv_out); echo;