From 9a10421f537e7f257deca55b6deab8ffb8f70d26 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 27 Aug 2018 08:14:02 +0200 Subject: [PATCH] build: use arm64 as DESTCPU for aarch64 On a aarch64 system I can run the complete build with tests without specifying the Makefile variable DESTCPU. But when running the tar-headers target DESTCPU is passed to configure: $(PYTHON) ./configure \ --prefix=/ \ --dest-cpu=$(DESTCPU) \ ... The value of DESTCPU in this case will be aarch64 which will cause configure to fail: configure: error: option --dest-cpu: invalid choice: 'aarch64' (choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x') In the configure script there is a matching of __aarch64__ to arm64: $ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64 In our case it would be nice to have consitent behaviour for both of these cases on aarch64. This commit changes DESTCPU to arm64 to be consistent with the configure script. DESTCPU is used in $(TARBALL)-headers and in $(BINARYTAR) but I'm not sure about the implications of making the change purposed and hope others might chime in and provide some guidance. PR-URL: https://github.com/nodejs/node/pull/22548 Reviewed-By: Richard Lau Reviewed-By: Refael Ackermann --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8769b5b95c9f58..50c5e2ed906a3e 100644 --- a/Makefile +++ b/Makefile @@ -731,7 +731,7 @@ ifeq ($(findstring arm,$(UNAME_M)),arm) DESTCPU ?= arm else ifeq ($(findstring aarch64,$(UNAME_M)),aarch64) -DESTCPU ?= aarch64 +DESTCPU ?= arm64 else ifeq ($(findstring powerpc,$(shell uname -p)),powerpc) DESTCPU ?= ppc64 @@ -751,7 +751,7 @@ else ifeq ($(DESTCPU),arm) ARCH=arm else -ifeq ($(DESTCPU),aarch64) +ifeq ($(DESTCPU),arm64) ARCH=arm64 else ifeq ($(DESTCPU),ppc64)