From f6a10924717ae7ea75c512db5690c24f8cc0e7ae Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Wed, 16 Jun 2021 08:12:42 +0900 Subject: [PATCH] build: allow to build riscv64 using Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/39048 Reviewed-By: Richard Lau Reviewed-By: Michaƫl Zasso --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index de2691b3414..886011b9879 100644 --- a/Makefile +++ b/Makefile @@ -847,6 +847,9 @@ else ifeq ($(findstring powerpc,$(shell uname -p)),powerpc) DESTCPU ?= ppc64 else +ifeq ($(findstring riscv64,$(UNAME_M)),riscv64) +DESTCPU ?= riscv64 +else DESTCPU ?= x86 endif endif @@ -857,6 +860,7 @@ endif endif endif endif +endif ifeq ($(DESTCPU),x64) ARCH=x64 else @@ -878,6 +882,9 @@ else ifeq ($(DESTCPU),s390x) ARCH=s390x else +ifeq ($(DESTCPU),riscv64) +ARCH=riscv64 +else ARCH=x86 endif endif @@ -886,6 +893,7 @@ endif endif endif endif +endif # node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32'). # pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU.