This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][build] Fix PR54138, make --without-cloog work


On Tue, Aug 14, 2012 at 1:27 PM, Richard Guenther <rguenther@suse.de> wrote:
>
> This makes --without-cloog and --without-isl disable GRAPHITE support
> as intended.
>
> Tested up to building stage2 with --without-isl, verified ISL was not
> used or checked for, tested up to building stage2 without --without-isl,
> verified system ISL was picked up.
>
> Ok for trunk?

Ping.

> Thanks,
> Richard.
>
> 2012-08-14  Richard Guenther  <rguenther@suse.de>
>
>         PR bootstrap/54138
>         * configure.ac: Re-organize ISL / CLOOG checks to allow
>         disabling with either --without-isl or --without-cloog.
>         * configure: Regenerated.
>         * config/cloog.m4: Adjust.
>         * config/isl.m4: Adjust.
>
> Index: configure.ac
> ===================================================================
> *** configure.ac        (revision 190376)
> --- configure.ac        (working copy)
> *************** AC_ARG_WITH(boot-ldflags,
> *** 1520,1563 ****
>    fi])
>   AC_SUBST(poststage1_ldflags)
>
> ! # Check for ISL
> ! dnl Provide configure switches and initialize islinc & isllibs
> ! dnl with user input.
> ! ISL_INIT_FLAGS
> ! if test "x$with_isl" != "xno"; then
>     dnl The minimal version of ISL required for Graphite.
>     ISL_CHECK_VERSION(0,10)
> -
>     dnl Only execute fail-action, if ISL has been requested.
>     ISL_IF_FAILED([
>       AC_MSG_ERROR([Unable to find a usable ISL.  See config.log for details.])])
> - fi
>
> ! # Check for CLOOG
> ! dnl Provide configure switches and initialize clooginc & clooglibs
> ! dnl with user input.
> ! CLOOG_INIT_FLAGS
> ! if test "x$isllibs" = x && test "x$islinc" = x; then
> !   clooglibs=
> !   clooginc=
> ! elif test "x$with_cloog" != "xno"; then
> !   dnl The minimal version of CLooG required for Graphite.
> !   dnl
> !   dnl If we use CLooG-Legacy, the provided version information is
> !   dnl ignored.
> !   CLOOG_CHECK_VERSION(0,17,0)
> !
> !   dnl Only execute fail-action, if CLooG has been requested.
> !   CLOOG_IF_FAILED([
> !     AC_MSG_ERROR([Unable to find a usable CLooG.  See config.log for details.])])
>   fi
>
>   # If either the ISL or the CLooG check failed, disable builds of in-tree
>   # variants of both
> ! if test "x$clooglibs" = x && test "x$clooginc" = x; then
>     noconfigdirs="$noconfigdirs cloog isl"
>   fi
>
>   # Check for LTO support.
>   AC_ARG_ENABLE(lto,
>   [AS_HELP_STRING([--enable-lto], [enable link time optimization support])],
> --- 1520,1590 ----
>    fi])
>   AC_SUBST(poststage1_ldflags)
>
> ! # GCC GRAPHITE dependences, ISL and CLOOG which in turn requires ISL.
> ! # Basic setup is inlined here, actual checks are in config/cloog.m4 and
> ! # config/isl.m4
> !
> ! AC_ARG_WITH(cloog,
> !   [AS_HELP_STRING(
> !     [--with-cloog=PATH],
> !     [Specify prefix directory for the installed CLooG-ISL package.
> !      Equivalent to --with-cloog-include=PATH/include
> !      plus --with-cloog-lib=PATH/lib])])
> ! AC_ARG_WITH(isl,
> !   [AS_HELP_STRING(
> !    [--with-isl=PATH],
> !    [Specify prefix directory for the installed ISL package.
> !     Equivalent to --with-isl-include=PATH/include
> !     plus --with-isl-lib=PATH/lib])])
> !
> ! # Treat either --without-cloog or --without-isl as a request to disable
> ! # GRAPHITE support and skip all following checks.
> ! if test "x$with_isl" != "xno" &&
> !    test "x$with_cloog" != "xno"; then
> !   # Check for ISL
> !   dnl Provide configure switches and initialize islinc & isllibs
> !   dnl with user input.
> !   ISL_INIT_FLAGS
>     dnl The minimal version of ISL required for Graphite.
>     ISL_CHECK_VERSION(0,10)
>     dnl Only execute fail-action, if ISL has been requested.
>     ISL_IF_FAILED([
>       AC_MSG_ERROR([Unable to find a usable ISL.  See config.log for details.])])
>
> !   if test "x$gcc_cv_isl" != "xno"; then
> !     # Check for CLOOG
> !     dnl Provide configure switches and initialize clooginc & clooglibs
> !     dnl with user input.
> !     CLOOG_INIT_FLAGS
> !     dnl The minimal version of CLooG required for Graphite.
> !     dnl
> !     dnl If we use CLooG-Legacy, the provided version information is
> !     dnl ignored.
> !     CLOOG_CHECK_VERSION(0,17,0)
> !
> !     dnl Only execute fail-action, if CLooG has been requested.
> !     CLOOG_IF_FAILED([
> !       AC_MSG_ERROR([Unable to find a usable CLooG.  See config.log for details.])])
> !   fi
>   fi
>
>   # If either the ISL or the CLooG check failed, disable builds of in-tree
>   # variants of both
> ! if test "x$with_isl" == xno ||
> !    test "x$with_cloog" == xno ||
> !    test "x$gcc_cv_cloog" = xno ||
> !    test "x$gcc_cv_isl" = xno; then
>     noconfigdirs="$noconfigdirs cloog isl"
> +   islinc=
> +   clooginc=
> +   clooglibs=
>   fi
>
> + AC_SUBST(islinc)
> + AC_SUBST(clooglibs)
> + AC_SUBST(clooginc)
> +
> +
>   # Check for LTO support.
>   AC_ARG_ENABLE(lto,
>   [AS_HELP_STRING([--enable-lto], [enable link time optimization support])],
> Index: config/isl.m4
> ===================================================================
> *** config/isl.m4       (revision 190376)
> --- config/isl.m4       (working copy)
> ***************
> *** 23,34 ****
>   # Initialize isllibs/islinc according to the user input.
>   AC_DEFUN([ISL_INIT_FLAGS],
>   [
> -   AC_ARG_WITH(isl,
> -     [AS_HELP_STRING(
> -       [--with-isl=PATH],
> -       [Specify prefix directory for the installed ISL package.
> -        Equivalent to --with-isl-include=PATH/include
> -        plus --with-isl-lib=PATH/lib])])
>     AC_ARG_WITH([isl-include],
>       [AS_HELP_STRING(
>         [--with-isl-include=PATH],
> --- 23,28 ----
> *************** AC_DEFUN([ISL_INIT_FLAGS],
> *** 73,84 ****
>       islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
>       ENABLE_ISL_CHECK=no
>     fi
> -
> -   isllibs="${isllibs} -lisl"
> -
> -   dnl Flags needed for ISL
> -   AC_SUBST(isllibs)
> -   AC_SUBST(islinc)
>   ]
>   )
>
> --- 67,72 ----
> Index: config/cloog.m4
> ===================================================================
> *** config/cloog.m4     (revision 190376)
> --- config/cloog.m4     (working copy)
> ***************
> *** 22,33 ****
>   # Initialize clooglibs/clooginc according to the user input.
>   AC_DEFUN([CLOOG_INIT_FLAGS],
>   [
> -   AC_ARG_WITH(cloog,
> -     [AS_HELP_STRING(
> -       [--with-cloog=PATH],
> -       [Specify prefix directory for the installed CLooG-PPL package.
> -        Equivalent to --with-cloog-include=PATH/include
> -        plus --with-cloog-lib=PATH/lib])])
>     AC_ARG_WITH([cloog-include],
>       [AS_HELP_STRING(
>         [--with-cloog-include=PATH],
> --- 22,27 ----
> *************** AC_DEFUN([CLOOG_INIT_FLAGS],
> *** 72,82 ****
>     fi
>
>     clooginc="-DCLOOG_INT_GMP ${clooginc}"
> !   clooglibs="${clooglibs} -lcloog-isl ${isllibs}"
> !
> !   dnl Flags needed for CLOOG
> !   AC_SUBST(clooglibs)
> !   AC_SUBST(clooginc)
>   ]
>   )
>
> --- 66,72 ----
>     fi
>
>     clooginc="-DCLOOG_INT_GMP ${clooginc}"
> !   clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
>   ]
>   )
>
> Index: configure
> ===================================================================
> *** configure   (revision 190376)
> --- configure   (working copy)
> *************** extra_host_libiberty_configure_flags
> *** 647,653 ****
>   clooginc
>   clooglibs
>   islinc
> - isllibs
>   poststage1_ldflags
>   poststage1_libs
>   stage1_libs
> --- 647,652 ----
> *************** with_stage1_ldflags
> *** 771,781 ****
>   with_stage1_libs
>   with_boot_libs
>   with_boot_ldflags
>   with_isl
>   with_isl_include
>   with_isl_lib
>   enable_isl_version_check
> - with_cloog
>   with_cloog_include
>   with_cloog_lib
>   enable_cloog_version_check
> --- 770,780 ----
>   with_stage1_libs
>   with_boot_libs
>   with_boot_ldflags
> + with_cloog
>   with_isl
>   with_isl_include
>   with_isl_lib
>   enable_isl_version_check
>   with_cloog_include
>   with_cloog_lib
>   enable_cloog_version_check
> *************** Optional Packages:
> *** 1527,1542 ****
>     --with-boot-libs=LIBS   libraries for stage2 and later
>     --with-boot-ldflags=FLAGS
>                             linker flags for stage2 and later
>     --with-isl=PATH         Specify prefix directory for the installed ISL
>                             package. Equivalent to
>                             --with-isl-include=PATH/include plus
>                             --with-isl-lib=PATH/lib
>     --with-isl-include=PATH Specify directory for installed ISL include files
>     --with-isl-lib=PATH     Specify the directory for the installed ISL library
> -   --with-cloog=PATH       Specify prefix directory for the installed CLooG-PPL
> -                           package. Equivalent to
> -                           --with-cloog-include=PATH/include plus
> -                           --with-cloog-lib=PATH/lib
>     --with-cloog-include=PATH
>                             Specify directory for installed CLooG include files
>     --with-cloog-lib=PATH   Specify the directory for the installed CLooG
> --- 1526,1541 ----
>     --with-boot-libs=LIBS   libraries for stage2 and later
>     --with-boot-ldflags=FLAGS
>                             linker flags for stage2 and later
> +   --with-cloog=PATH       Specify prefix directory for the installed CLooG-ISL
> +                           package. Equivalent to
> +                           --with-cloog-include=PATH/include plus
> +                           --with-cloog-lib=PATH/lib
>     --with-isl=PATH         Specify prefix directory for the installed ISL
>                             package. Equivalent to
>                             --with-isl-include=PATH/include plus
>                             --with-isl-lib=PATH/lib
>     --with-isl-include=PATH Specify directory for installed ISL include files
>     --with-isl-lib=PATH     Specify the directory for the installed ISL library
>     --with-cloog-include=PATH
>                             Specify directory for installed CLooG include files
>     --with-cloog-lib=PATH   Specify the directory for the installed CLooG
> *************** fi
> *** 5626,5632 ****
>
>
>
> ! # Check for ISL
>
>
>   # Check whether --with-isl was given.
> --- 5625,5639 ----
>
>
>
> ! # GCC GRAPHITE dependences, ISL and CLOOG which in turn requires ISL.
> ! # Basic setup is inlined here, actual checks are in config/cloog.m4 and
> ! # config/isl.m4
> !
> !
> ! # Check whether --with-cloog was given.
> ! if test "${with_cloog+set}" = set; then :
> !   withval=$with_cloog;
> ! fi
>
>
>   # Check whether --with-isl was given.
> *************** if test "${with_isl+set}" = set; then :
> *** 5635,5640 ****
> --- 5642,5654 ----
>   fi
>
>
> + # Treat either --without-cloog or --without-isl as a request to disable
> + # GRAPHITE support and skip all following checks.
> + if test "x$with_isl" != "xno" &&
> +    test "x$with_cloog" != "xno"; then
> +   # Check for ISL
> +
> +
>   # Check whether --with-isl-include was given.
>   if test "${with_isl_include+set}" = set; then :
>     withval=$with_isl_include;
> *************** fi
> *** 5681,5694 ****
>       ENABLE_ISL_CHECK=no
>     fi
>
> -   isllibs="${isllibs} -lisl"
>
>
> -
> -
> -
> - if test "x$with_isl" != "xno"; then
> -
>     if test "${ENABLE_ISL_CHECK}" = yes ; then
>       _isl_saved_CFLAGS=$CFLAGS
>       _isl_saved_LDFLAGS=$LDFLAGS
> --- 5695,5702 ----
> *************** $as_echo "$gcc_cv_isl" >&6; }
> *** 5744,5750 ****
>
>
>
> -
>     if test "x${with_isl}" = xno; then
>       graphite_requested=no
>     elif test "x${with_isl}" != x \
> --- 5752,5757 ----
> *************** $as_echo "$gcc_cv_isl" >&6; }
> *** 5770,5784 ****
>     fi
>
>
> - fi
> -
> - # Check for CLOOG
> -
>
> ! # Check whether --with-cloog was given.
> ! if test "${with_cloog+set}" = set; then :
> !   withval=$with_cloog;
> ! fi
>
>
>   # Check whether --with-cloog-include was given.
> --- 5777,5785 ----
>     fi
>
>
>
> !   if test "x$gcc_cv_isl" != "xno"; then
> !     # Check for CLOOG
>
>
>   # Check whether --with-cloog-include was given.
> *************** fi
> *** 5827,5842 ****
>     fi
>
>     clooginc="-DCLOOG_INT_GMP ${clooginc}"
> !   clooglibs="${clooglibs} -lcloog-isl ${isllibs}"
> !
> !
> !
>
>
> - if test "x$isllibs" = x && test "x$islinc" = x; then
> -   clooglibs=
> -   clooginc=
> - elif test "x$with_cloog" != "xno"; then
>
>
>
> --- 5828,5836 ----
>     fi
>
>     clooginc="-DCLOOG_INT_GMP ${clooginc}"
> !   clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
>
>
>
>
>
> *************** $as_echo "$gcc_cv_cloog" >&6; }
> *** 5908,5925 ****
>       && test "x${clooglibs}" = x \
>       && test "x${clooginc}" = x ; then
>
> !     as_fn_error "Unable to find a usable CLooG.  See config.log for details." "$LINENO" 5
>     fi
>
>
>   fi
>
>   # If either the ISL or the CLooG check failed, disable builds of in-tree
>   # variants of both
> ! if test "x$clooglibs" = x && test "x$clooginc" = x; then
>     noconfigdirs="$noconfigdirs cloog isl"
>   fi
>
>   # Check for LTO support.
>   # Check whether --enable-lto was given.
>   if test "${enable_lto+set}" = set; then :
> --- 5902,5931 ----
>       && test "x${clooglibs}" = x \
>       && test "x${clooginc}" = x ; then
>
> !       as_fn_error "Unable to find a usable CLooG.  See config.log for details." "$LINENO" 5
>     fi
>
>
> +   fi
>   fi
>
>   # If either the ISL or the CLooG check failed, disable builds of in-tree
>   # variants of both
> ! if test "x$with_isl" == xno ||
> !    test "x$with_cloog" == xno ||
> !    test "x$gcc_cv_cloog" = xno ||
> !    test "x$gcc_cv_isl" = xno; then
>     noconfigdirs="$noconfigdirs cloog isl"
> +   islinc=
> +   clooginc=
> +   clooglibs=
>   fi
>
> +
> +
> +
> +
> +
>   # Check for LTO support.
>   # Check whether --enable-lto was given.
>   if test "${enable_lto+set}" = set; then :


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]