fixes ISA handling

This commit is contained in:
Eyck Jentzsch 2023-12-06 10:00:33 +01:00
parent 1b8f78fe78
commit fe1136c7ce
2 changed files with 9 additions and 4 deletions

View File

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

View File

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