Hi,
Canadian build of arm/aarch64 (and other targets) toolchains are broken
because of isl library check. There is below code in top level gcc
configuration.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.12 of
ISL" >&5
$as_echo_n "checking for version 0.12 of ISL... " >&6; }
if test "$cross_compiling" = yes; then :
gcc_cv_isl=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
For Canadian build, corss_compiling is set to `yes', then gcc_cv_isl is set
to `yes' accordingly, no matter whether isl library is available or not.
We also can't set it to `no' by default, because "--with-isl=xxxx" option
would be nullified in this way. I think the best we can do here is add
AC_LINK_IFELSE when checking.
This patch fixes the issue.
Is it OK?
2014-08-21 Bin Cheng <[email protected]>
* config/isl.m4 (ISL_CHECK_VERSION): Check link of isl library
for cross_compiling.
* configure: Regenerated.
Index: config/isl.m4
===================================================================
--- config/isl.m4 (revision 214255)
+++ config/isl.m4 (working copy)
@@ -122,7 +122,11 @@ AC_DEFUN([ISL_CHECK_VERSION],
AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
[gcc_cv_isl=yes],
[gcc_cv_isl=no],
- [gcc_cv_isl=yes])
+ [
+ AC_LINK_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
+ [gcc_cv_isl=yes],
+ [gcc_cv_isl=no])
+ ])
AC_MSG_RESULT([$gcc_cv_isl])
CFLAGS=$_isl_saved_CFLAGS
Index: configure
===================================================================
--- configure (revision 214255)
+++ configure (working copy)
@@ -5907,8 +5907,30 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disa
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.12 of ISL"
>&5
$as_echo_n "checking for version 0.12 of ISL... " >&6; }
if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <isl/version.h>
+ #include <string.h>
+int
+main ()
+{
+if (strncmp (isl_version (), "isl-0.12", strlen ("isl-0.12")) != 0)
+ return 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_isl=yes
else
+ gcc_cv_isl=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <isl/version.h>