aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2021-12-27 11:09:39 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2021-12-27 11:09:39 +0100
commite8dbd9ac6a28094b9a2c04cb79478d68b0e3eb07 (patch)
tree7d604206a2deb29c9f097ff1f3b7de78f44b34a3
parentd330c1406bea318011e70692f3a92826c0046ab5 (diff)
downloadpicorv32-e8dbd9ac6a28094b9a2c04cb79478d68b0e3eb07.tar.gz
picorv32-e8dbd9ac6a28094b9a2c04cb79478d68b0e3eb07.zip
Fix dhrystone
-rw-r--r--dhrystone/Makefile2
-rw-r--r--dhrystone/dhry.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/dhrystone/Makefile b/dhrystone/Makefile
index 4dc0361..89cb110 100644
--- a/dhrystone/Makefile
+++ b/dhrystone/Makefile
@@ -1,6 +1,6 @@
USE_MYSTDLIB = 0
OBJS = dhry_1.o dhry_2.o stdlib.o
-CFLAGS = -MD -O3 -march=rv32im -DTIME -DRISCV
+CFLAGS = -MD -O3 -mabi=ilp32 -march=rv32im -DTIME -DRISCV
TOOLCHAIN_PREFIX = /opt/riscv32im/bin/riscv32-unknown-elf-
ifeq ($(USE_MYSTDLIB),1)
diff --git a/dhrystone/dhry.h b/dhrystone/dhry.h
index bafacc6..41f1495 100644
--- a/dhrystone/dhry.h
+++ b/dhrystone/dhry.h
@@ -383,8 +383,13 @@
/* General definitions: */
+#ifdef USE_MYSTDLIB
+extern char *strcpy(char *dest, const char *src);
+extern int strcmp(const char *s1, const char *s2);
+#else
#include <stdio.h>
/* for strcpy, strcmp */
+#endif
#define Null 0
/* Value of a Null pointer */