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"),)