aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2014-11-06 18:17:42 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2014-11-06 18:17:42 -0800
commit5afc6b9bc2e3685220cffb3da66ad9f5f1f7b14f (patch)
tree654b7243b9e4079ed1fa46d0931ec3d74717621d /benchmarks
parentc897f34a637fc38137eaf56f3d785ea4fce7a3bd (diff)
downloadriscv-tests-5afc6b9bc2e3685220cffb3da66ad9f5f1f7b14f.zip
riscv-tests-5afc6b9bc2e3685220cffb3da66ad9f5f1f7b14f.tar.gz
riscv-tests-5afc6b9bc2e3685220cffb3da66ad9f5f1f7b14f.tar.bz2
Fix build with riscv-gcc version 4.9
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/Makefile2
-rw-r--r--benchmarks/common/syscalls.c1
-rw-r--r--benchmarks/mm/mm_main.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index 241a933..f8db5b9 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -52,7 +52,7 @@ HOST_OPTS = -std=gnu99 -DPREALLOCATE=0 -DHOST_DEBUG=1
HOST_COMP = gcc $(HOST_OPTS)
RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -Wa,-march=RVIMAFDXhwacha -std=gnu99 -O2 -ffast-math
+RISCV_GCC_OPTS = -static -Wa,-march=RVIMAFDXhwacha -std=gnu99 -O2 -ffast-math
RISCV_LINK = riscv-gcc -T $(bmarkdir)/common/test.ld $(incs)
RISCV_LINK_MT = riscv-gcc -T $(bmarkdir)/common/test-mt.ld
RISCV_LINK_OPTS = -nostdlib -nostartfiles -ffast-math -lc
diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c
index e9f04e2..7be2b53 100644
--- a/benchmarks/common/syscalls.c
+++ b/benchmarks/common/syscalls.c
@@ -106,6 +106,7 @@ static long syscall(long num, long arg0, long arg1, long arg2)
void exit(int code)
{
syscall(SYS_exit, code, 0, 0);
+ while (1);
}
void setStats(int enable)
diff --git a/benchmarks/mm/mm_main.c b/benchmarks/mm/mm_main.c
index 522768a..3bbfdcf 100644
--- a/benchmarks/mm/mm_main.c
+++ b/benchmarks/mm/mm_main.c
@@ -1,6 +1,7 @@
#include "common.h"
#include <assert.h>
#include <stdlib.h>
+#include <stdio.h>
#include "util.h"
void thread_entry(int cid, int nc)