From 3c043ee27f26a831f27cb9b8aa4db7426faeacd7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 21 Apr 2023 14:37:29 -0700 Subject: [PATCH] Use $RISCV includes for tests --- tests/Makefile | 5 +++-- tests/encoding.h | 1 - tests/hello.c | 2 +- tests/mt-hello.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) delete mode 120000 tests/encoding.h diff --git a/tests/Makefile b/tests/Makefile index 28976a6a..b61bfb30 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,7 +2,8 @@ # RISCV Toolchain ################################# -PREFIX = riscv64-unknown-elf- +PREFIX_NO_MINUS = riscv64-unknown-elf +PREFIX = $(PREFIX_NO_MINUS)- GCC = $(PREFIX)gcc CXX = $(PREFIX)g++ @@ -21,7 +22,7 @@ ARCH = rv64imafdc ABI = lp64d ARCHFLAGS = -march=$(ARCH) -mabi=$(ABI) -CFLAGS = -std=gnu99 -O2 -fno-common -fno-builtin-printf -Wall +CFLAGS = -std=gnu99 -O2 -fno-common -fno-builtin-printf -Wall -I$(RISCV)/$(PREFIX_NO_MINUS)/include CFLAGS += $(ARCHFLAGS) LDFLAGS = -static diff --git a/tests/encoding.h b/tests/encoding.h deleted file mode 120000 index f398b163..00000000 --- a/tests/encoding.h +++ /dev/null @@ -1 +0,0 @@ -../toolchains/riscv-tools/riscv-tests/env/encoding.h \ No newline at end of file diff --git a/tests/hello.c b/tests/hello.c index dbfbfe56..7709f91a 100644 --- a/tests/hello.c +++ b/tests/hello.c @@ -1,5 +1,5 @@ #include -#include "encoding.h" +#include "riscv-pk/encoding.h" #include "marchid.h" int main(void) { diff --git a/tests/mt-hello.c b/tests/mt-hello.c index 5ab47a56..2ba0e32f 100644 --- a/tests/mt-hello.c +++ b/tests/mt-hello.c @@ -1,4 +1,4 @@ -#include "encoding.h" +#include "riscv-pk/encoding.h" #include #include "marchid.h"