Hi, Trying to build config-list.mk for current trunk. The box is a stable debian (7.8 it seems) so the OS' ISL is too old thus i was attempting to use in-tree ISL.
When using an in-tree ISL gcc attempts to determine if it is recent enough and AFAIU 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". The attached seems to get me past compilation of graphite-isl-ast-to-gimple.c with config-list.mk for e.g. alpha-linux-gnu I'm scheduling a proper regstrap on x86_64-linux-gnu for a native compiler but this will take days to start i fear. So.. if somebody has spare cycles.. :) cheers, config/ChangeLog: 2015-04-01 Bernhard Reutner-Fischer <al...@gcc.gnu.org> * isl.m4 (ISL_CHECK_VERSION): AC_SUBST ENABLE_ISL_CHECK. ChangeLog: 2015-04-01 Bernhard Reutner-Fischer <al...@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 <al...@gcc.gnu.org> * configure.ac: Assume a current ISL when using in-tree ISL. * configure: Regenerate.
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 <al...@gcc.gnu.org> * isl.m4 (ISL_CHECK_VERSION): AC_SUBST ENABLE_ISL_CHECK. ChangeLog: 2015-04-01 Bernhard Reutner-Fischer <al...@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 <al...@gcc.gnu.org> * configure.ac: Assume a current ISL when using in-tree ISL. * configure: Regenerate. diff --git a/Makefile.in b/Makefile.in index 36b4008..4ea875e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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@ diff --git a/Makefile.tpl b/Makefile.tpl index 1ea1954..5794128 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -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@ diff --git a/config/isl.m4 b/config/isl.m4 index 459fac1..67634e0 100644 --- a/config/isl.m4 +++ b/config/isl.m4 @@ -116,6 +116,7 @@ AC_DEFUN([ISL_CHECK_VERSION], LDFLAGS=$_isl_saved_LDFLAGS LIBS=$_isl_saved_LIBS fi + AC_SUBST([ENABLE_ISL_CHECK])dnl ] ) diff --git a/configure b/configure index 064e69b..0e4b0f2 100755 --- a/configure +++ b/configure @@ -649,6 +649,7 @@ extra_linker_plugin_flags extra_linker_plugin_configure_flags islinc isllibs +ENABLE_ISL_CHECK poststage1_ldflags poststage1_libs stage1_ldflags diff --git a/gcc/configure b/gcc/configure index 20dbce6..a3ac299 100755 --- a/gcc/configure +++ b/gcc/configure @@ -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 diff --git a/gcc/configure.ac b/gcc/configure.ac index 68b0ee8..a0b06b4 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -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