Skip to content

Commit 300f158

Browse files
authored
Merge pull request #2239 from martin-frbg/issue2231
Fix 32bit armv8 compilation regression
2 parents 5fdf9ad + 3635fdb commit 300f158

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile.system

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ ifndef TOPDIR
99
TOPDIR = .
1010
endif
1111

12-
# If ARCH is not set, we use the host system's architecture.
12+
# If ARCH is not set, we use the host system's architecture for getarch compile options.
1313
ifndef ARCH
14-
ARCH := $(shell uname -m)
14+
HOSTARCH := $(shell uname -m)
15+
else
16+
HOSTARCH = $(ARCH)
1517
endif
1618

1719
# Catch conflicting usage of ARCH in some BSD environments
@@ -143,7 +145,7 @@ endif
143145

144146

145147
# On x86_64 build getarch with march=native unless the compiler is PGI. This is required to detect AVX512 support in getarch.
146-
ifeq ($(ARCH), x86_64)
148+
ifeq ($(HOSTARCH), x86_64)
147149
ifeq ($(findstring pgcc,$(HOSTCC)),)
148150
GETARCH_FLAGS += -march=native
149151
endif

0 commit comments

Comments
 (0)