From 08380798fab6285bfddb406344e21a671b6a02f9 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 20 Jan 2017 19:21:24 -0800 Subject: [PATCH] Fix build with glibc --- benchmarks/Makefile | 2 +- benchmarks/common/syscalls.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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; -- 2.30.2