From 492a8f4f538f4c9ac3541b04f8b2c4a7eccdd7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sat, 6 Jan 2024 14:42:39 -0500 Subject: [PATCH] Fix `make o/aarch64/ape` on aarch64 (#1064) --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index d60e01db6..f1f3b9717 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,18 @@ COMPILE = build/bootstrap/compile.com -V9 -P4096 $(QUOTA) IGNORE := $(shell $(MKDIR) $(TMPDIR)) +# the default build modes is empty string +# on x86_64 hosts, MODE= is the same as MODE=x86_64 +# on aarch64 hosts, MODE= is changed to MODE=aarch64 +ifeq ($(MODE),) +ifeq ($(UNAME_M),arm64) +MODE := aarch64 +endif +ifeq ($(UNAME_M),aarch64) +MODE := aarch64 +endif +endif + ifneq ($(findstring aarch64,$(MODE)),) ARCH = aarch64 HOSTS ?= pi studio freebsdarm @@ -158,18 +170,6 @@ else ADDR2LINE = $(TOOLCHAIN)addr2line endif -# the default build modes is empty string -# on x86_64 hosts, MODE= is the same as MODE=x86_64 -# on aarch64 hosts, MODE= is changed to MODE=aarch64 -ifeq ($(MODE),) -ifeq ($(UNAME_M),arm64) -MODE := aarch64 -endif -ifeq ($(UNAME_M),aarch64) -MODE := aarch64 -endif -endif - # primary build rules all: o o: o/$(MODE)