scripts,isa: merge riscv{32,64}.mk into riscv.mk

This commit is contained in:
Zihao Yu 2023-06-30 23:25:08 +08:00
parent 6d79d0efb0
commit ad8f8fb636
7 changed files with 11 additions and 14 deletions

5
scripts/isa/riscv.mk Normal file
View file

@ -0,0 +1,5 @@
CROSS_COMPILE := riscv64-linux-gnu-
COMMON_CFLAGS := -fno-pic -march=rv64g -mcmodel=medany -mstrict-align
CFLAGS += $(COMMON_CFLAGS) -static
ASFLAGS += $(COMMON_CFLAGS) -O0
LDFLAGS += -melf64lriscv

View file

@ -1,5 +0,0 @@
CROSS_COMPILE := riscv64-linux-gnu-
COMMON_FLAGS := -fno-pic -march=rv32g -mabi=ilp32
CFLAGS += $(COMMON_FLAGS) -static
ASFLAGS += $(COMMON_FLAGS) -O0
LDFLAGS += -melf32lriscv

View file

@ -1,5 +0,0 @@
CROSS_COMPILE := riscv64-linux-gnu-
COMMON_FLAGS := -fno-pic -march=rv64g -mcmodel=medany -mstrict-align
CFLAGS += $(COMMON_FLAGS) -static
ASFLAGS += $(COMMON_FLAGS) -O0
LDFLAGS += -melf64lriscv

View file

@ -1,6 +1,8 @@
include $(AM_HOME)/scripts/isa/riscv32.mk
include $(AM_HOME)/scripts/isa/riscv.mk
include $(AM_HOME)/scripts/platform/nemu.mk
CFLAGS += -DISA_H=\"riscv/riscv.h\"
COMMON_CFLAGS += -march=rv32im_zicsr -mabi=ilp32e # overwrite
LDFLAGS += -melf32lriscv # overwrite
AM_SRCS += riscv/nemu/start.S \
riscv/nemu/cte.c \

View file

@ -1,4 +1,4 @@
include $(AM_HOME)/scripts/isa/riscv64.mk
include $(AM_HOME)/scripts/isa/riscv.mk
include $(AM_HOME)/scripts/platform/nemu.mk
CFLAGS += -DISA_H=\"riscv/riscv.h\"

View file

@ -1,4 +1,4 @@
include $(AM_HOME)/scripts/isa/riscv64.mk
include $(AM_HOME)/scripts/isa/riscv.mk
AM_SRCS := riscv/npc/start.S \
riscv/npc/trm.c \

View file

@ -1,4 +1,4 @@
include $(AM_HOME)/scripts/isa/riscv64.mk
include $(AM_HOME)/scripts/isa/riscv.mk
AM_SRCS := riscv/spike/trm.c \
riscv/spike/ioe.c \