build: set DESTCPU correctly for 'make binary' on loongarch64

Signed-off-by: 吴小白 <296015668@qq.com>
PR-URL: https://github.com/nodejs/node/pull/56271
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
吴小白 authored and Marco Ippolito committed 2025-01-24 22:18:58 +01:00
1 parent af020edf96
commit ae683a9e1f
1 file changed
+8
+8
View File
@@ -933,6 +933,9 @@ else
ifeq ($(findstring riscv64,$(UNAME_M)),riscv64)
DESTCPU ?= riscv64
else
ifeq ($(findstring loongarch64,$(UNAME_M)),loongarch64)
DESTCPU ?= loong64
else
DESTCPU ?= x86
endif
endif
@@ -946,6 +949,7 @@ endif
endif
endif
endif
endif
ifeq ($(DESTCPU),x64)
ARCH=x64
else
@@ -970,6 +974,9 @@ else
ifeq ($(DESTCPU),riscv64)
ARCH=riscv64
else
ifeq ($(DESTCPU),loong64)
ARCH=loong64
else
ARCH=x86
endif
endif
@@ -979,6 +986,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.