Index: gap-4r8p2/configure
===================================================================
--- gap-4r8p2.orig/configure	2016-02-26 18:17:51.062422655 +0100
+++ gap-4r8p2/configure	2016-02-26 18:18:00.342614061 +0100
@@ -4064,7 +4064,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; }
@@ -4120,7 +4120,7 @@
 $as_echo "$CONFIGNAME" >&6; }
 
 
-GAPARCH=$target-$BASECC-${CONFIGNAME}
+GAPARCH=$host-$BASECC-${CONFIGNAME}
 
 
 
@@ -4222,7 +4222,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-4r8p2/configure.in
===================================================================
--- gap-4r8p2.orig/configure.in	2016-02-26 18:17:51.062422655 +0100
+++ gap-4r8p2/configure.in	2016-02-26 18:18:00.342614061 +0100
@@ -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)
@@ -75,7 +75,7 @@
 AC_MSG_RESULT([$CONFIGNAME])
 AC_SUBST(CONFIGNAME)
 
-GAPARCH=$target-$BASECC-${CONFIGNAME}
+GAPARCH=$host-$BASECC-${CONFIGNAME}
 AC_SUBST(GAPARCH)
 
 AC_ARG_WITH(gmp,
@@ -144,7 +144,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=""
