From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11555 invoked by alias); 20 Mar 2013 09:39:09 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 11469 invoked by uid 89); 20 Mar 2013 09:38:40 -0000 X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mail.ispras.ru (HELO mail.ispras.ru) (83.149.199.45) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 20 Mar 2013 09:38:35 +0000 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mail.ispras.ru (Postfix) with ESMTPSA id EEB5354003F for ; Wed, 20 Mar 2013 13:38:31 +0400 (MSK) Received: by mail-wi0-f181.google.com with SMTP id hm6so1521639wib.8 for ; Wed, 20 Mar 2013 02:38:31 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.83.105 with SMTP id p9mr8993027wjy.56.1363772311234; Wed, 20 Mar 2013 02:38:31 -0700 (PDT) Received: by 10.194.242.106 with HTTP; Wed, 20 Mar 2013 02:38:31 -0700 (PDT) In-Reply-To: <201303150029.24388.yann.morin.1998@free.fr> References: <5141DCFC.1070408@ispras.ru> <201303150029.24388.yann.morin.1998@free.fr> Date: Wed, 20 Mar 2013 09:39:00 -0000 Message-ID: Subject: Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8 From: Dmitry Plotnikov To: "Yann E. MORIN" Cc: crossgcc@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-03/txt/msg00085.txt.bz2 Yann, All, Thank you for the comments! New version of patch below. > > If ISL is needed, the selection should be automatic, not left to the user > to decide. > > Use the "CC_GCC_X_Y_or_later" semantics (with X.Y the gcc version), > that selects the required libs. See how it is done for, eg. gcc 4.7 > with the symbol "CC_GCC_4_7_or_later". > GCC 4.8 now supported only as "custom version", so I'm not sure about how to do that selection automatic. > Please, can you confirm the following (I think I read that somewhere, > can't find it again, though...): > - even if CLooG now requires ISL and not PPL, PPL is still needed > directly by gcc, right? > (so, gcc still needs to "select CC_GCC_NEEDS_PPL") > GCC's configure from recent trunk has option --with-ppl, so probably it's still needed. > > Err... be careful with the version strings, they all are 0.18.0, even the > 0.16.x and 0.17.x ones. > > Are the 0.16.x and 0.17.x really needed? Can't we just bump to 0.18.0? > I have tested all with 0.18.0, works fine for me, so I removed 0.16.x and 0.17.x > > I'd rather we use positive semantics, rather than negative. What about: > > config CLOOG_0_18_or_later > bool > > config CLOOG_NEEDS_PPL > def_bool y > depends on ! CLOOG_0_16_OR_LATER > > And then, propagate the "CLOOG_NEEDS_PPL" down to where it is meaningfull. > Rewriten. > > Did you check this still worked with previous versions of GLooG? > Why do you want to build all instead of just the library? > > We just need the library, and IIRC the change was done on purpose; but > revision ab0759ba292c is not very verbose as to why this change was > needed. Blame me... :-( > I have checked this with 0.18.0 and 0.15.11. I want to build all because there were some errors with missing includes for ISL and CLooG that were solved by building all. Signed-off-by: "Plotnikov Dmitry" diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/cc/gcc.in.2 ct-ng-1.18/lib/ct-ng.1.18.0/config/cc/gcc.in.2 --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/cc/gcc.in.2 2013-02-01 00:07:52.000000000 +0400 +++ ct-ng-1.18/lib/ct-ng.1.18.0/config/cc/gcc.in.2 2013-03-14 14:45:06.985719092 +0400 @@ -85,6 +85,16 @@ config CC_GCC_USE_GRAPHITE On some systems (eg. Cygwin), PPL and/or CLooG may not build properly (yet), so you'll have to say 'N' here. +config CC_GCC_GRAPHITE_ISL + bool + prompt "Enable ISL for GRAPHITE" + default n + depends on CC_GCC_USE_GRAPHITE + select ISL_NEEDED + help + GCC trunk versions later than 14 Jan 2013 requires ISL + library for GRAPHITE + # The way LTO works is a bit twisted. # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements # Basically: diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/companion_libs/cloog.in ct-ng-1.18/lib/ct-ng.1.18.0/config/companion_libs/cloog.in --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/companion_libs/cloog.in 2013-02-01 00:07:52.000000000 +0400 +++ ct-ng-1.18/lib/ct-ng.1.18.0/config/companion_libs/cloog.in 2013-03-15 19:10:31.581879662 +0400 @@ -6,6 +6,11 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +config CLOOG_V_0_18_0 + bool + prompt "0.18.0" + select CLOOG_0_18_or_later + config CLOOG_V_0_15_11 bool prompt "0.15.11" @@ -38,6 +43,7 @@ config CLOOG_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "0.18.0" if CLOOG_V_0_18_0 default "0.15.11" if CLOOG_V_0_15_11 default "0.15.10" if CLOOG_V_0_15_10 default "0.15.9" if CLOOG_V_0_15_9 @@ -49,5 +55,14 @@ config CLOOG_0_15_1x bool select CLOOG_NEEDS_AUTORECONF +config CLOOG_NEEDS_PPL + def_bool y + depends on ! CLOOG_0_18_or_later + +config CLOOG_PPL_PREFIX + string + default "" if CLOOG_0_18_or_later + default "-ppl" + config CLOOG_NEEDS_AUTORECONF bool diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/companion_libs/isl.in ct-ng-1.18/lib/ct-ng.1.18.0/config/companion_libs/isl.in --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/companion_libs/isl.in 1970-01-01 03:00:00.000000000 +0300 +++ ct-ng-1.18/lib/ct-ng.1.18.0/config/companion_libs/isl.in 2013-03-14 14:38:24.325702720 +0400 @@ -0,0 +1,20 @@ +# ISL options + +choice + bool + prompt "ISL version" +# Don't remove next line +# CT_INSERT_VERSION_BELOW + +config ISL_V_0_11_1 + bool + prompt "0.11.1" + +endchoice + +config ISL_VERSION + string +# Don't remove next line +# CT_INSERT_VERSION_STRING_BELOW + default "0.11.1" if ISL_V_0_11_1 + diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/companion_libs.in ct-ng-1.18/lib/ct-ng.1.18.0/config/companion_libs.in --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/config/companion_libs.in 2013-02-01 00:07:52.000000000 +0400 +++ ct-ng-1.18/lib/ct-ng.1.18.0/config/companion_libs.in 2013-03-14 14:38:15.613702365 +0400 @@ -27,6 +27,11 @@ config CLOOG_NEEDED select CLOOG select COMPLIBS_NEEDED +config ISL_NEEDED + bool + select ISL + select COMPLIBS_NEEDED + config MPC_NEEDED bool select MPC @@ -60,6 +65,11 @@ config CLOOG select PPL select COMPLIBS +config ISL + bool + select CLOOG + select COMPLIBS + config MPC bool select GMP @@ -85,6 +95,9 @@ endif if CLOOG source "config/companion_libs/cloog.in" endif +if ISL +source "config/companion_libs/isl.in" +endif if MPC source "config/companion_libs/mpc.in" endif diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/cc/gcc.sh ct-ng-1.18/lib/ct-ng.1.18.0/scripts/build/cc/gcc.sh --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/cc/gcc.sh 2013-02-01 00:07:53.000000000 +0400 +++ ct-ng-1.18/lib/ct-ng.1.18.0/scripts/build/cc/gcc.sh 2013-03-15 17:52:42.009689794 +0400 @@ -289,6 +289,9 @@ do_cc_core_backend() { host_libstdcxx_flags+=("-lpwl") fi extra_config+=("--with-cloog=${complibs}") + if [ "${CT_CLOOG_NEEDS_PPL}" != "y" ]; then + extra_config+=("--with-isl=${complibs}") + fi elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then extra_config+=("--with-ppl=no") extra_config+=("--with-cloog=no") @@ -695,6 +705,9 @@ do_cc_backend() { host_libstdcxx_flags+=("-lpwl") fi extra_config+=("--with-cloog=${complibs}") + if [ "${CT_CLOOG_NEEDS_PPL}" != "y" ]; then + extra_config+=("--with-isl=${complibs}") + fi elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then extra_config+=("--with-ppl=no") extra_config+=("--with-cloog=no") diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/companion_libs/130-cloog.sh ct-ng-1.18/lib/ct-ng.1.18.0/scripts/build/companion_libs/130-cloog.sh --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/companion_libs/130-cloog.sh 2013-02-01 00:07:53.000000000 +0400 +++ ct-ng-1.18/lib/ct-ng.1.18.0/scripts/build/companion_libs/130-cloog.sh 2013-03-15 18:23:36.841765212 +0400 @@ -12,7 +12,7 @@ if [ "${CT_CLOOG}" = "y" ]; then # Download CLooG do_cloog_get() { - CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \ + CT_GetFile "cloog${CT_CLOOG_PPL_PREFIX}-${CT_CLOOG_VERSION}" \ ftp://gcc.gnu.org/pub/gcc/infrastructure } @@ -24,14 +24,14 @@ do_cloog_extract() { # while versions 0.15.4 onward do have the version in the dirname. # But, because the infrastructure properly creates the extracted # directories (with tar's --strip-components), we can live safely... - CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}" - CT_Patch "cloog-ppl" "${CT_CLOOG_VERSION}" + CT_Extract "cloog${CT_CLOOG_PPL_PREFIX}-${CT_CLOOG_VERSION}" + CT_Patch "cloog${CT_CLOOG_PPL_PREFIX}" "${CT_CLOOG_VERSION}" # Help the autostuff in case it thinks there are things to regenerate... - CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}/m4" + CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/cloog${CT_CLOOG_PPL_PREFIX}-${CT_CLOOG_VERSION}/m4" if [ "${CT_CLOOG_NEEDS_AUTORECONF}" = "y" ]; then - CT_Pushd "${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}" + CT_Pushd "${CT_SRC_DIR}/cloog${CT_CLOOG_PPL_PREFIX}-${CT_CLOOG_VERSION}/" CT_DoExecLog CFG ./autogen.sh CT_Popd fi @@ -49,7 +49,7 @@ do_cloog_for_build() { esac CT_DoStep INFO "Installing CLooG/PPL for build" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-build-${CT_BUILD}" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog${CT_CLOOG_PPL_PREFIX}-build-${CT_BUILD}" cloog_opts+=( "host=${CT_BUILD}" ) cloog_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) @@ -66,7 +66,7 @@ do_cloog_for_host() { local -a cloog_opts CT_DoStep INFO "Installing CLooG/PPL for host" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-host-${CT_HOST}" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog${CT_CLOOG_PPL_PREFIX}-host-${CT_HOST}" cloog_opts+=( "host=${CT_HOST}" ) cloog_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) @@ -89,7 +89,7 @@ do_cloog_backend() { local prefix local cflags local ldflags - local cloog_src_dir="${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}" + local cloog_src_dir="${CT_SRC_DIR}/cloog${CT_CLOOG_PPL_PREFIX}-${CT_CLOOG_VERSION}" local arg for arg in "$@"; do @@ -114,7 +114,7 @@ do_cloog_backend() { --enable-static CT_DoLog EXTRA "Building CLooG/ppl" - CT_DoExecLog ALL make ${JOBSFLAGS} libcloog.la + CT_DoExecLog ALL make ${JOBSFLAGS} all if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking CLooG/ppl" @@ -122,7 +122,7 @@ do_cloog_backend() { fi CT_DoLog EXTRA "Installing CLooG/ppl" - CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS + CT_DoExecLog ALL make install } fi # CT_CLOOG diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/companion_libs/135-isl.sh ct-ng-1.18/lib/ct-ng.1.18.0/scripts/build/companion_libs/135-isl.sh --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/companion_libs/135-isl.sh 1970-01-01 03:00:00.000000000 +0300 +++ ct-ng-1.18/lib/ct-ng.1.18.0/scripts/build/companion_libs/135-isl.sh 2013-03-15 18:26:04.469771216 +0400 @@ -0,0 +1,114 @@ +# This file adds the functions to build the ISL library +# Copyright 2009 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_isl_get() { :; } +do_isl_extract() { :; } +do_isl_for_build() { :; } +do_isl_for_host() { :; } + +# Overide functions depending on configuration +if [ "${CT_ISL}" = "y" ]; then + +# Download ISL +do_isl_get() { + CT_GetFile "isl-0.11.1" \ + ftp://gcc.gnu.org/pub/gcc/infrastructure +} + +# Extract ISL +do_isl_extract() { + local _t + + CT_Extract "isl-0.11.1" +} + +# Build ISL for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_isl_for_build() { + local -a isl_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing ISL for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-build-${CT_BUILD}" + + isl_opts+=( "host=${CT_BUILD}" ) + isl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + isl_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) + do_isl_backend "${isl_opts[@]}" + + CT_Popd + CT_EndStep +} + +# Build ISL for running on host +do_isl_for_host() { + local -a isl_opts + + CT_DoStep INFO "Installing ISL for host" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-host-${CT_HOST}" + + isl_opts+=( "host=${CT_HOST}" ) + isl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) + isl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) + do_isl_backend "${isl_opts[@]}" + + CT_Popd + CT_EndStep +} + +# Build ISL +# Parameter : description : type : default +# host : machine to run on : tuple : (none) +# prefix : prefix to install into : dir : (none) +# cflags : cflags to use : string : (empty) +# ldflags : ldflags to use : string : (empty) +do_isl_backend() { + local host + local prefix + local cflags + local ldflags + local isl_src_dir="${CT_SRC_DIR}/isl-0.11.1" + local arg + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + CT_DoLog EXTRA "Configuring ISL" + + CT_DoExecLog CFG \ + CFLAGS="${cflags}" \ + LDFLAGS="${ldflags}" \ + LIBS="-lm" \ + "${isl_src_dir}/configure" \ + --build=${CT_BUILD} \ + --host=${host} \ + --prefix="${prefix}" \ + --with-gmp="${prefix}" \ + --with-ppl="${prefix}" \ + --with-bits=gmp \ + --with-host-libstdcxx='-lstdc++' \ + --disable-shared \ + --enable-static + + CT_DoLog EXTRA "Building ISL" + CT_DoExecLog ALL make ${JOBSFLAGS} all + + if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking ISL" + CT_DoExecLog ALL make ${JOBSFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing ISL" + CT_DoExecLog ALL make install +} + +fi # CT_ISL diff -rupdN ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/showSamples.sh ct-ng-1.18/lib/ct-ng.1.18.0/scripts/showSamples.sh --- ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/showSamples.sh 2013-02-01 00:07:53.000000000 +0400 +++ ct-ng-1.18/lib/ct-ng.1.18.0/scripts/showSamples.sh 2013-03-14 14:26:15.229673072 +0400 @@ -56,12 +56,14 @@ dump_single_sample() { -o -n "${CT_MPFR}" \ -o -n "${CT_PPL}" \ -o -n "${CT_CLOOG}" \ + -o -n "${CT_ISL}" \ -o -n "${CT_MPC}" \ -o -n "${CT_LIBELF}" \ -o -n "${CT_GMP_TARGET}" \ -o -n "${CT_MPFR_TARGET}" \ -o -n "${CT_PPL_TARGET}" \ -o -n "${CT_CLOOG_TARGET}" \ + -o -n "${CT_ISL_TARGET}" \ -o -n "${CT_MPC_TARGET}" \ -o -n "${CT_LIBELF_TARGET}" \ ]; then @@ -72,6 +74,7 @@ dump_single_sample() { [ -z "${CT_MPFR}" -a -z "${CT_MPFR_TARGET}" ] || printf " mpfr-%s" "${CT_MPFR_VERSION}" [ -z "${CT_PPL}" -a -z "${CT_PPL_TARGET}" ] || printf " ppl-%s" "${CT_PPL_VERSION}" [ -z "${CT_CLOOG}" -a -z "${CT_CLOOG_TARGET}" ] || printf " cloog-ppl-%s" "${CT_CLOOG_VERSION}" + [ -z "${CT_ISL}" -a -z "${CT_ISL_TARGET}" ] || printf " isl-%s" "${CT_ISL_VERSION}" [ -z "${CT_MPC}" -a -z "${CT_MPC_TARGET}" ] || printf " mpc-%s" "${CT_MPC_VERSION}" [ -z "${CT_LIBELF}" -a -z "${CT_LIBELF_TARGET}" ] || printf " libelf-%s" "${CT_LIBELF_VERSION}" [ -z "${complibs}" ] || printf "\n" -- For unsubscribe information see http://sourceware.org/lists.html#faq