Index: gap-4r7p5/configure
===================================================================
--- gap-4r7p5.orig/configure	2014-06-29 13:58:59.168363626 +0200
+++ gap-4r7p5/configure	2014-06-29 14:00:07.545682360 +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-4r7p5/configure.in
===================================================================
--- gap-4r7p5.orig/configure.in	2014-06-29 13:58:59.168363626 +0200
+++ gap-4r7p5/configure.in	2014-06-29 13:59:30.972976872 +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=""
