diff --git a/debian/multiarch.h.in b/debian/multiarch.h.in
index 84bea0a..434af68 100644
--- a/debian/multiarch.h.in
+++ b/debian/multiarch.h.in
@@ -20,21 +20,21 @@
 # elif defined(__m68k__) && !defined(__mcoldfire__)
 #  include <m68k-linux-gnu/@subdir@/@header@>
 # elif defined(__mips_hard_float) && defined(_MIPSEL)
-#  if defined(_ABIO32)
+#  if _MIPS_SIM == _ABIO32
 #   include <mipsel-linux-gnu/@subdir@/@header@>
-#  elif defined(_ABIN32)
+#  elif _MIPS_SIM == _ABIN32
 #   include <mips64el-linux-gnuabin32/@subdir@/@header@>
-#  elif defined(_ABI64)
+#  elif _MIPS_SIM == _ABI64
 #   include <mips64el-linux-gnuabi64/@subdir@/@header@>
 #  else
 #   error unknown multiarch location for @header@
 #  endif
 # elif defined(__mips_hard_float)
-#  if defined(_ABIO32)
+#  if _MIPS_SIM == _ABIO32
 #   include <mips-linux-gnu/@subdir@/@header@>
-#  elif defined(_ABIN32)
+#  elif _MIPS_SIM == _ABIN32
 #   include <mips64-linux-gnuabin32/@subdir@/@header@>
-#  elif defined(_ABI64)
+#  elif _MIPS_SIM == _ABI64
 #   include <mips64-linux-gnuabi64/@subdir@/@header@>
 #  else
 #   error unknown multiarch location for @header@
diff --git a/debian/rules b/debian/rules
index a594c3a..915804d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,10 +33,10 @@ ifneq (,$(findstring nobench, $(DEB_BUILD_OPTIONS)))
   WITHOUT_BENCH := yes
 endif
 ifeq ($(on_buildd),yes)
-  ifneq (,$(findstring $(DEB_HOST_ARCH), armel hppa mips mipsel s390 hurd-i386 kfreebsd-amd64 kfreebsd-i386))
+  ifneq (,$(findstring $(DEB_HOST_ARCH), armel hppa mips mipsel mipsn32 mipsn32el mips64 mips64el s390 hurd-i386 kfreebsd-amd64 kfreebsd-i386))
     WITHOUT_CHECK := yes
   endif
-  ifneq (,$(findstring $(DEB_HOST_ARCH), armel hppa mips mipsel s390 hurd-i386))
+  ifneq (,$(findstring $(DEB_HOST_ARCH), armel hppa mips mipsel mipsn32 mipsn32el mips64 mips64el s390 hurd-i386))
     WITHOUT_BENCH := yes
   endif
 endif
@@ -521,7 +521,7 @@ endif
 stamps/stamp-pybench:
 	echo "pybench run disabled for this build" > $(buildd_static)/pybench.log
 
-#ifeq (,$(filter $(DEB_HOST_ARCH), arm armel avr32 hppa mips mipsel m68k))
+#ifeq (,$(filter $(DEB_HOST_ARCH), arm armel avr32 hppa mips mipsel mips64 mips64el m68k))
   pybench_options = -C 2 -n 5 -w 4
 #endif
 
