Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: Handle -m64 and -msse2 flags better
--- bowtie2.orig/Makefile
+++ bowtie2/Makefile
@@ -58,16 +58,13 @@
   endif
 endif
 
-BITS := 32
-ifneq (,$(findstring $(shell uname -m), x86_64 amd64))
-  BITS := 64
+CXXFLAGS += -fopenmp-simd
+CPPFLAGS += -Ithird_party
+ifeq (amd64,$(dpkg-architecture -q DEB_TARGET_ARCH))
   SSE_FLAG := -msse2
   POPCNT_CAPABILITY ?= 1
-else ifneq (,$(findstring $(shell uname -m), aarch64 arm64 s390x ppc64 ppc64le))
-  BITS := 64
-  SSE_FLAG :=
-  CXXFLAGS += -fopenmp-simd
-  CPPFLAGS += -Ithird_party
+else
+  SSE_FLAG =
   POPCNT_CAPABILITY ?= 0
 endif
 
