From fe1136c7cef627c7352c1c38da5261da9e6f2764 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 6 Dec 2023 10:00:33 +0100 Subject: [PATCH] fixes ISA handling --- benchmarks/dhrystone/Makefile | 2 +- hello-world/Makefile | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/benchmarks/dhrystone/Makefile b/benchmarks/dhrystone/Makefile index b6750e8..050791d 100644 --- a/benchmarks/dhrystone/Makefile +++ b/benchmarks/dhrystone/Makefile @@ -8,7 +8,7 @@ HEADERS := dhry.h BOARD=iss LINK_TARGET=link RISCV_ARCH:=rv32$(ISA) -ifeq ($(ISA),e) +ifneq (,$(findstring e,$(ISA))) RISCV_ABI:=ilp32e else RISCV_ABI:=ilp32 diff --git a/hello-world/Makefile b/hello-world/Makefile index 17feac9..aaa1e40 100644 --- a/hello-world/Makefile +++ b/hello-world/Makefile @@ -1,5 +1,6 @@ - TARGET = hello +ISA?=imc + C_SRCS = $(wildcard *.c) HEADERS = $(wildcard *.h) OPT ?= -O2 @@ -7,8 +8,12 @@ CFLAGS += $(OPT) -g BOARD=iss LINK_TARGET=link -RISCV_ARCH:=rv32e -RISCV_ABI:=ilp32e +RISCV_ARCH:=rv32$(ISA) +ifneq (,$(findstring e,$(ISA))) + RISCV_ABI:=ilp32e +else + RISCV_ABI:=ilp32 +endif LDFLAGS += -g -Wl,--wrap=printf compiler := $(shell which riscv64-unknown-elf-gcc)