From d86ed0d7a778407f026047a813174da6862d029b Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 19 Apr 2024 21:03:21 +0900 Subject: [PATCH] lisp/Makefile.Linux: fix regression, set MACHINE if not defined --- lisp/Makefile.Linux | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/Makefile.Linux b/lisp/Makefile.Linux index 0689d83de..e54a713e6 100644 --- a/lisp/Makefile.Linux +++ b/lisp/Makefile.Linux @@ -59,22 +59,21 @@ $(info "-- GCC_MACHINE = ${GCC_MACHINE}") ifneq ($(GCC_MACHINE),) ifneq (,$(findstring x86_64-linux-gnu,$(GCC_MACHINE))) MACHINE=x86_64 - endif - ifneq (,$(findstring i686-linux-gnu,$(GCC_MACHINE))) + else ifneq (,$(findstring i686-linux-gnu,$(GCC_MACHINE))) MACHINE=i686 - endif - ifneq (,$(findstring aarch64-linux-gnu,$(GCC_MACHINE))) + else ifneq (,$(findstring aarch64-linux-gnu,$(GCC_MACHINE))) MACHINE=aarch64 - endif - ifneq (,$(findstring arm-linux-gnu,$(GCC_MACHINE))) + else ifneq (,$(findstring arm-linux-gnu,$(GCC_MACHINE))) MACHINE=arm - endif - ifneq (,$(findstring powerpc64le-linux-gnu,$(GCC_MACHINE))) + else ifneq (,$(findstring powerpc64le-linux-gnu,$(GCC_MACHINE))) MACHINE=ppc64le - endif - ifneq (,$(findstring mips64el-linux-gnu,$(GCC_MACHINE))) + else ifneq (,$(findstring mips64el-linux-gnu,$(GCC_MACHINE))) MACHINE=mips64 + else + MACHINE=$(subst -linux-gnu,,$(GCC_MACHINE)) endif +else + MACHINE=$(shell uname -m) endif # need to set 'i486', for conditionals in c/*.[ch]. ifneq ($(shell gcc -dumpmachine | grep "i.*86-linux"),)