Skip to content

Commit b2c6b14

Browse files
committed
riscv(misc): add support in Makefile
1 parent 48376fd commit b2c6b14

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ FILES_JITLIB= bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua \
100100
dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua \
101101
dis_mips64.lua dis_mips64el.lua \
102102
dis_mips64r6.lua dis_mips64r6el.lua \
103+
dis_riscv.lua dis_riscv64.lua \
103104
vmdef.lua
104105

105106
ifeq (,$(findstring Windows,$(OS)))

src/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ CCOPT_arm=
5252
CCOPT_arm64=
5353
CCOPT_ppc=
5454
CCOPT_mips=
55+
CCOPT_riscv64=
5556
#
5657
#CCDEBUG=
5758
# Uncomment the next line to generate debug information:
@@ -269,6 +270,9 @@ ifneq (,$(findstring LJ_TARGET_MIPS ,$(TARGET_TESTARCH)))
269270
else
270271
TARGET_LJARCH= mips
271272
endif
273+
else
274+
ifneq (,$(findstring LJ_TARGET_RISCV64 ,$(TARGET_TESTARCH)))
275+
TARGET_LJARCH= riscv64
272276
else
273277
$(error Unsupported target architecture)
274278
endif
@@ -278,6 +282,7 @@ endif
278282
endif
279283
endif
280284
endif
285+
endif
281286

282287
ifneq (,$(findstring LJ_TARGET_PS3 1,$(TARGET_TESTARCH)))
283288
TARGET_SYS= PS3
@@ -481,6 +486,9 @@ ifeq (ppc,$(TARGET_LJARCH))
481486
DASM_AFLAGS+= -D ELFV2
482487
endif
483488
endif
489+
ifneq (,$(findstring LJ_TARGET_RISCV64 ,$(TARGET_TESTARCH)))
490+
DASM_AFLAGS+= -D RISCV64
491+
endif
484492
endif
485493
endif
486494

0 commit comments

Comments
 (0)