Fix build with riscv-gcc version 4.9
authorAndrew Waterman <waterman@cs.berkeley.edu>
Fri, 7 Nov 2014 02:17:42 +0000 (18:17 -0800)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Fri, 7 Nov 2014 02:17:42 +0000 (18:17 -0800)
benchmarks/Makefile
benchmarks/common/syscalls.c
benchmarks/mm/mm_main.c
env
isa/Makefile

index 241a933ca787f275d200f5657e9e3d1f77115dab..f8db5b95e6315a499c7894337160ca1955c7e174 100644 (file)
@@ -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
index e9f04e23e5f645449a53362236cd1f44c43f1717..7be2b53c871d9e32c6f6a9fb46739897ab34191e 100644 (file)
@@ -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)
index 522768a4fb11276e4145dc1cf1ed58867c816afb..3bbfdcf559ca98fdb2b49da79e0cd49cb1878367 100644 (file)
@@ -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)
diff --git a/env b/env
index 94975f1bc2b06e931c200fd66eb0aaf95f9b0fe1..b81960a4094f30e0e4d9a90ad7c2699e7b63c80c 160000 (submodule)
--- a/env
+++ b/env
@@ -1 +1 @@
-Subproject commit 94975f1bc2b06e931c200fd66eb0aaf95f9b0fe1
+Subproject commit b81960a4094f30e0e4d9a90ad7c2699e7b63c80c
index b876406bc6ebbb428a8f023fae24d9b91d94b54c..1ec64c0ea6b2c6b376e0cdbfcc1c8a90c6f8ae8f 100644 (file)
@@ -19,7 +19,7 @@ default: all
 #--------------------------------------------------------------------
 
 RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -fpic -nostdlib -nostartfiles -Wa,-march=RVIMAFDXhwacha
+RISCV_GCC_OPTS = -static -fpic -fvisibility=hidden -nostdlib -nostartfiles -Wa,-march=RVIMAFDXhwacha
 RISCV_OBJDUMP = riscv-objdump --disassemble-all --section=.text --section=.data --section=.bss
 RISCV_SIM = spike --extension=hwacha