Index: gap-4r6p5/configure
===================================================================
--- gap-4r6p5.orig/configure	2013-09-09 21:48:17.862810117 +0200
+++ gap-4r6p5/configure	2013-09-09 21:48:48.939260398 +0200
@@ -4118,7 +4118,7 @@
     GMP_VER="$with_gmp"
     ;;
   system)
-    GMP_CFLAGS="-m${ABI}"
+    GMP_CFLAGS="${ABI_CFLAGS}"
     GMP_LIBS="-lgmp"
     MAKE_GMP=""
     ;;
Index: gap-4r6p5/configure.in
===================================================================
--- gap-4r6p5.orig/configure.in	2013-09-09 21:48:17.862810117 +0200
+++ gap-4r6p5/configure.in	2013-09-09 21:48:48.939260398 +0200
@@ -102,7 +102,7 @@
     GMP_VER="$with_gmp"
     ;;
   system)
-    GMP_CFLAGS="-m${ABI}"
+    GMP_CFLAGS="${ABI_CFLAGS}"
     GMP_LIBS="-lgmp"
     MAKE_GMP=""
     ;;
