Author: Michael R. Crusoe <crusoe@debian.org>
Description: Handle -m64 and -msse2 flags better
Forwarded: not-needed
--- a/Makefile
+++ b/Makefile
@@ -67,10 +67,9 @@ ifneq (,$(findstring Darwin,$(shell unam
   endif
 endif
 
-BITS := 32
-ARCH ?= $(shell uname -m)
-ifneq (,$(findstring $(ARCH), x86_64 amd64))
-  BITS := 64
+CXXFLAGS += -fopenmp-simd
+CPPFLAGS += -Ithird_party
+ifneq (,$(findstring $(shell dpkg-architecture -q DEB_TARGET_ARCH), x86_64 amd64))
   ifeq (1, $(SSE_AVX2))
 	SSE_FLAG := -mavx2 -faligned-new -DSSE_AVX2
   else
@@ -78,11 +77,8 @@ ifneq (,$(findstring $(ARCH), x86_64 amd
   endif
 
   POPCNT_CAPABILITY ?= 1
-else ifneq (,$(findstring $(ARCH), aarch64 arm64 s390x powerpc64 powerpc64le ppc64 ppc64le))
-  BITS := 64
+else
   SSE_FLAG :=
-  CXXFLAGS += -fopenmp-simd
-  CPPFLAGS += -Ithird_party
   POPCNT_CAPABILITY ?= 0
 endif
 
