From: Andrew Waterman Date: Fri, 7 Nov 2014 02:17:42 +0000 (-0800) Subject: Fix build with riscv-gcc version 4.9 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5afc6b9bc2e3685220cffb3da66ad9f5f1f7b14f;p=riscv-tests.git Fix build with riscv-gcc version 4.9 --- 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 #include +#include #include "util.h" void thread_entry(int cid, int nc) diff --git a/env b/env index 94975f1..b81960a 160000 --- a/env +++ b/env @@ -1 +1 @@ -Subproject commit 94975f1bc2b06e931c200fd66eb0aaf95f9b0fe1 +Subproject commit b81960a4094f30e0e4d9a90ad7c2699e7b63c80c diff --git a/isa/Makefile b/isa/Makefile index b876406..1ec64c0 100644 --- a/isa/Makefile +++ b/isa/Makefile @@ -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