Description: do not add -m64 for 64bit archs
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@
 
 # system specific stuff (concerning 64bit compilation)
 MACHINE:=$(shell uname -m)
+
 ifeq ($(64bit),yes)
   ifneq ($(MACHINE),x86_64)
     m64=yes
@@ -36,14 +37,19 @@
   STATICBIN := bin/ltrsift_static bin/ltrsift_encode_static
 endif
 
-ifeq ($(m32),yes)
-  CFLAGS += -m32
-endif
+ifneq ($(x32),yes)
+  ifeq ($(m32),yes)
+    CFLAGS += -m32
+  endif
 
-ifeq ($(m64),yes)
-  CFLAGS += -m64
+  ifeq ($(m64),yes)
+    ifeq (,$(filter $(MACHINE),arm64 ia64 alpha mips64 mips64el aarch64))
+      CFLAGS += -m64
+    endif
+  endif
 endif
 
+
 ifneq ($(errorcheck),no)
   CFLAGS += -Werror
 endif
