Fix build with glibc
authorAndrew Waterman <andrew@sifive.com>
Sat, 21 Jan 2017 03:21:24 +0000 (19:21 -0800)
committerAndrew Waterman <andrew@sifive.com>
Sat, 21 Jan 2017 03:22:59 +0000 (19:22 -0800)
benchmarks/Makefile
benchmarks/common/syscalls.c

index bc179279c8c49c10c325858a0feed67f2c82a16a..531d9817072f02e74376470ec64db47b34fcc25a 100644 (file)
@@ -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_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
 
 RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data
 RISCV_SIM ?= spike --isa=rv$(XLEN)gc
 
index 7357fab3912848fae3ad701398f720c4283ef723..3f15aac8d446b93cdc092c6ec85293dd2cbc6986 100644 (file)
@@ -11,6 +11,8 @@
 #define SYS_exit 93
 #define SYS_stats 1234
 
 #define SYS_exit 93
 #define SYS_stats 1234
 
+#undef strcmp
+
 extern volatile uint64_t tohost;
 extern volatile uint64_t fromhost;
 
 extern volatile uint64_t tohost;
 extern volatile uint64_t fromhost;