From: Andrew Waterman Date: Sat, 21 Jan 2017 03:21:24 +0000 (-0800) Subject: Fix build with glibc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08380798fab6285bfddb406344e21a671b6a02f9;p=riscv-tests.git Fix build with glibc --- diff --git a/benchmarks/Makefile b/benchmarks/Makefile index bc17927..531d981 100644 --- a/benchmarks/Makefile +++ b/benchmarks/Makefile @@ -53,7 +53,7 @@ RISCV_GCC ?= $(RISCV_PREFIX)gcc RISCV_GCC_OPTS ?= -mcmodel=medany -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 -lgcc +RISCV_LINK_OPTS ?= -static -nostdlib -nostartfiles -lgcc RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data RISCV_SIM ?= spike --isa=rv$(XLEN)gc diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c index 7357fab..3f15aac 100644 --- a/benchmarks/common/syscalls.c +++ b/benchmarks/common/syscalls.c @@ -11,6 +11,8 @@ #define SYS_exit 93 #define SYS_stats 1234 +#undef strcmp + extern volatile uint64_t tohost; extern volatile uint64_t fromhost;