From 9cc0098ce2886644e37ccf044e05940485cd3f83 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 10 Nov 2021 22:27:14 +0100 Subject: [PATCH] Fix potentially wrong HOSTARCH definition in cross-compilation --- Makefile.system | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile.system b/Makefile.system index a97cca70c..16e8fcbd6 100644 --- a/Makefile.system +++ b/Makefile.system @@ -9,11 +9,10 @@ ifndef TOPDIR TOPDIR = . endif - # If ARCH is not set, we use the host system's architecture for getarch compile options. -ifndef ARCH +# we need to use the host system's architecture for getarch compile options even especially when cross-compiling HOSTARCH := $(shell uname -m) -else -HOSTARCH = $(ARCH) +ifeq ($(HOSTARCH), amd64) +HOSTARCH=x86_64 endif HAVE_GAS := $(shell as -v < /dev/null 2>&1 | grep GNU 2>&1 >/dev/null)