aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/Makefile
diff options
context:
space:
mode:
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;