Skip to content

Commit

Permalink
build: use arm64 as DESTCPU for aarch64
Browse files Browse the repository at this point in the history
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: #22548
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
danbev authored and targos committed Sep 6, 2018
1 parent 68b0f49 commit 70d4039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -751,7 +751,7 @@ else
ifeq ($(DESTCPU),arm)
ARCH=arm
else
ifeq ($(DESTCPU),aarch64)
ifeq ($(DESTCPU),arm64)
ARCH=arm64
else
ifeq ($(DESTCPU),ppc64)
Expand Down

0 comments on commit 70d4039

Please sign in to comment.