When using an in-tree ISL gcc attempts to determine if it is recent
enough and fails to do so since the system's ISL (which we will not use)
might be too old and the in-tree ISL is not yet built.
This results in HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE being not
set and thus compilation of graphite-isl-ast-to-gimple.c fails with
"template with C linkage".
config/ChangeLog:
2015-04-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* isl.m4 (ISL_CHECK_VERSION): AC_SUBST ENABLE_ISL_CHECK.
ChangeLog:
2015-04-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* Makefile.tpl: Set HOST_ISL_CHECK from substituted
ENABLE_ISL_CHECK.
(HOST_EXPORTS): Add ENABLE_ISL_CHECK.
* Makefile.in: Regenerate.
gcc/ChangeLog:
2015-04-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* configure.ac: Assume a current ISL when using in-tree ISL.
* configure: Regenerate.
@@ -222,6 +222,7 @@ HOST_EXPORTS = \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
+ ENABLE_ISL_CHECK="$(HOST_ISL_CHECK)"; export ENABLE_ISL_CHECK; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
@if gcc-bootstrap
@@ -314,6 +315,8 @@ HOST_GMPINC = @gmpinc@
# Where to find ISL
HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
+# in-tree ISL has ENABLE_ISL_CHECK set to "no"
+HOST_ISL_CHECK = @ENABLE_ISL_CHECK@
# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
@@ -225,6 +225,7 @@ HOST_EXPORTS = \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
+ ENABLE_ISL_CHECK="$(HOST_ISL_CHECK)"; export ENABLE_ISL_CHECK; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
@if gcc-bootstrap
@@ -317,6 +318,8 @@ HOST_GMPINC = @gmpinc@
# Where to find ISL
HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
+# in-tree ISL has ENABLE_ISL_CHECK set to "no"
+HOST_ISL_CHECK = @ENABLE_ISL_CHECK@
# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
@@ -116,6 +116,7 @@ AC_DEFUN([ISL_CHECK_VERSION],
LDFLAGS=$_isl_saved_LDFLAGS
LIBS=$_isl_saved_LIBS
fi
+ AC_SUBST([ENABLE_ISL_CHECK])dnl
]
)
@@ -649,6 +649,7 @@ extra_linker_plugin_flags
extra_linker_plugin_configure_flags
islinc
isllibs
+ENABLE_ISL_CHECK
poststage1_ldflags
poststage1_libs
stage1_ldflags
@@ -28175,15 +28175,25 @@ fi
# Check whether isl_schedule_constraints_compute_schedule is available;
# it's new in ISL-0.13.
-if test "x${ISLLIBS}" != "x" ; then
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $ISLINC"
- saved_LIBS="$LIBS"
- LIBS="$LIBS $ISLLIBS $GMPLIBS"
+# When using an in-tree ISL then we assume it is recent enough
+if test x"$ENABLE_ISL_CHECK" = x"no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
+$as_echo_n "checking Checking for isl_schedule_constraints_compute_schedule... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (in-tree)" >&5
+$as_echo "yes (in-tree)" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
+$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
+
+else
+ if test "x${ISLLIBS}" != "x" ; then
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ISLINC"
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $ISLLIBS $GMPLIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
$as_echo_n "checking Checking for isl_schedule_constraints_compute_schedule... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <isl/schedule.h>
int
@@ -28201,16 +28211,17 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
- LIBS="$saved_LIBS"
- CFLAGS="$saved_CFLAGS"
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
- if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
+ fi
fi
fi
@@ -5663,25 +5663,33 @@ fi
# Check whether isl_schedule_constraints_compute_schedule is available;
# it's new in ISL-0.13.
-if test "x${ISLLIBS}" != "x" ; then
- saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $ISLINC"
- saved_LIBS="$LIBS"
- LIBS="$LIBS $ISLLIBS $GMPLIBS"
-
- AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
- AC_TRY_LINK([#include <isl/schedule.h>],
- [isl_schedule_constraints_compute_schedule (NULL);],
- [ac_has_isl_schedule_constraints_compute_schedule=yes],
- [ac_has_isl_schedule_constraints_compute_schedule=no])
- AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
-
- LIBS="$saved_LIBS"
- CFLAGS="$saved_CFLAGS"
-
- if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
- AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
- [Define if isl_schedule_constraints_compute_schedule exists.])
+# When using an in-tree ISL then we assume it is recent enough
+if test x"$ENABLE_ISL_CHECK" = x"no"; then
+ AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
+ AC_MSG_RESULT([yes (in-tree)])
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
+ [Define if isl_schedule_constraints_compute_schedule exists.])
+else
+ if test "x${ISLLIBS}" != "x" ; then
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ISLINC"
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $ISLLIBS $GMPLIBS"
+
+ AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
+ AC_TRY_LINK([#include <isl/schedule.h>],
+ [isl_schedule_constraints_compute_schedule (NULL);],
+ [ac_has_isl_schedule_constraints_compute_schedule=yes],
+ [ac_has_isl_schedule_constraints_compute_schedule=no])
+ AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
+
+ LIBS="$saved_LIBS"
+ CFLAGS="$saved_CFLAGS"
+
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
+ [Define if isl_schedule_constraints_compute_schedule exists.])
+ fi
fi
fi