Fix dhrystone

This commit is contained in:
Miodrag Milanovic 2021-12-27 11:09:39 +01:00
parent d330c1406b
commit e8dbd9ac6a
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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 */