Skip to content

Commit f6a1092

Browse files
makotokatotargos
authored andcommitted
build: allow to build riscv64 using Makefile
PR-URL: #39048 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 29673b8 commit f6a1092

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,9 @@ else
847847
ifeq ($(findstring powerpc,$(shell uname -p)),powerpc)
848848
DESTCPU ?= ppc64
849849
else
850+
ifeq ($(findstring riscv64,$(UNAME_M)),riscv64)
851+
DESTCPU ?= riscv64
852+
else
850853
DESTCPU ?= x86
851854
endif
852855
endif
@@ -857,6 +860,7 @@ endif
857860
endif
858861
endif
859862
endif
863+
endif
860864
ifeq ($(DESTCPU),x64)
861865
ARCH=x64
862866
else
@@ -878,6 +882,9 @@ else
878882
ifeq ($(DESTCPU),s390x)
879883
ARCH=s390x
880884
else
885+
ifeq ($(DESTCPU),riscv64)
886+
ARCH=riscv64
887+
else
881888
ARCH=x86
882889
endif
883890
endif
@@ -886,6 +893,7 @@ endif
886893
endif
887894
endif
888895
endif
896+
endif
889897

890898
# node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32').
891899
# pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU.

0 commit comments

Comments
 (0)