Index: gap-4r7p7/configure
===================================================================
--- gap-4r7p7.orig/configure	2015-04-30 22:39:28.475739230 +0200
+++ gap-4r7p7/configure	2015-04-30 22:39:43.000000000 +0200
@@ -4060,7 +4060,7 @@
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-BASECC=`basename ${CC}`
+BASECC=gcc
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
@@ -4107,7 +4107,7 @@
 $as_echo "$CONFIGNAME" >&6; }
 
 
-GAPARCH=$target-$BASECC-${CONFIGNAME}
+GAPARCH=$host-$BASECC-${CONFIGNAME}
 
 
 
@@ -4209,7 +4209,7 @@
                    requires m4, which has not been detected on your system.
                    Please install m4 or build without GMP." "$LINENO" 5
   fi
-  case "$target" in
+  case "$host" in
     arm*)
       ABI="standard"
       ABI_CFLAGS=""
Index: gap-4r7p7/configure.in
===================================================================
--- gap-4r7p7.orig/configure.in	2015-04-30 22:39:28.475739230 +0200
+++ gap-4r7p7/configure.in	2015-04-30 22:39:43.000000000 +0200
@@ -48,7 +48,7 @@
 AC_CONFIG_AUX_DIR(cnf)
 AC_CANONICAL_TARGET
 AC_PROG_CC
-BASECC=`basename ${CC}`
+BASECC=gcc
 AC_SUBST(BASECC)
 AC_PROG_MAKE_SET
 AC_SUBST(gapdir)
@@ -66,7 +66,7 @@
 AC_MSG_RESULT([$CONFIGNAME])
 AC_SUBST(CONFIGNAME)
 
-GAPARCH=$target-$BASECC-${CONFIGNAME}
+GAPARCH=$host-$BASECC-${CONFIGNAME}
 AC_SUBST(GAPARCH)
 
 AC_ARG_WITH(gmp,
@@ -135,7 +135,7 @@
                    requires m4, which has not been detected on your system.
                    Please install m4 or build without GMP.])
   fi
-  case "$target" in
+  case "$host" in
     arm*)
       ABI="standard"
       ABI_CFLAGS=""
