public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
       [not found] <5141DCFC.1070408@ispras.ru>
@ 2013-03-14 23:29 ` Yann E. MORIN
  2013-03-15 11:33   ` Steven Newbury
  2013-03-20  9:39   ` Dmitry Plotnikov
  0 siblings, 2 replies; 7+ messages in thread
From: Yann E. MORIN @ 2013-03-14 23:29 UTC (permalink / raw)
  To: Plotnikov Dmitry; +Cc: crossgcc

Dmitry, All,

[Please, do not post as HTML]

On Thursday 14 March 2013 Plotnikov Dmitry wrote:
> Current GCC trunk requires CLooG version 0.17.0 and later which is now 
> using libisl instead of PPL.  New Graphite also requires libisl 
> (http://gcc.gnu.org/wiki/Graphite-4.8).  This patch adds an ability to 
> build current GCC trunk by adding support for the new CLooG versions and 
> libisl to the companion libraries.  I'm not sure that this is the 
> most beautiful way to implement this, but I hope that this patch will be 
> useful for the community.

Next time, please post the patch in the mail body, it is easier to review
and comment. You can use 'hg email' to send patches in properly-formatted
emails.

Also, you need to add your Signed-off-by line to each of your patches. See:
    http://elinux.org/Developer_Certificate_Of_Origin

> diff -rupd 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

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".

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")

>  # The way LTO works is a bit twisted.
>  # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
> 
>  # Basically:
> diff -rupd 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-14 15:21:08.309806972 +0400
[--SNIP--]
> @@ -38,6 +53,9 @@ 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.18.0" if CLOOG_V_0_16_2
> +    default "0.18.0" if CLOOG_V_0_16_1

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?

> @@ -45,9 +63,17 @@ config CLOOG_VERSION
>      default "0.15.7" if CLOOG_V_0_15_7
>      default "0.15.6" if CLOOG_V_0_15_6

> +config CLOOG_0_16_OR_LATER
> +    bool

In all the other "_or_later" symbols, the "-Or_later" is lower-case, not
upper-case.

(Note: if not addind 0.16.x and 0.17.x, and only adding 0.18.0, rename
this symbol to "CLOOG_0_18_or_later").

> +    select CLOOG_WITHOUT_PPL
> +
[--SNIP--]
> +config CLOOG_WITHOUT_PPL
> +    bool
> +

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.

[--SNIP--]
> diff -rupd 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-14 15:18:54.957801549 +0400
> @@ -289,6 +289,9 @@ do_cc_core_backend() {
>              host_libstdcxx_flags+=("-lpwl")
>          fi
>          extra_config+=("--with-cloog=${complibs}")
> +        if [ "${CT_CLOOG_WITHOUT_PPL}" = "y" ]; then

Again, use positive semantics, something like:
    if [ "${CT_CLOOG_WITH_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_WITHOUT_PPL}" = "y" ]; then

Ditto.

> +            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 -rupd ct-ng-1.18-clean/lib/ct-ng.1.18.0/scripts/build/companion_libs/130-cloog.s h 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.s h 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-14 15:17:17.981797607 +0400
> @@ -10,9 +10,15 @@ do_cloog_for_host() { :; }
> # Overide functions depending on configuration
> if [ "${CT_CLOOG}" = "y" ]; then
> 
> +PPL_PREFIX="-ppl"
> +
> +if [ "${CT_CLOOG_WITHOUT_PPL}" = "y" ]; then
> +  PPL_PREFIX=""
> +fi

if [ "${CT_CLOOG_WITH_PPL}" = "y" ]; then
    PPL_PREFIX=
else
    PPL_PREFIX="-ppl"
fi

[--SNIP--]
> @@ -114,7 +120,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

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... :-(

>      if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
>          CT_DoLog EXTRA "Checking CLooG/ppl"
> @@ -122,7 +128,7 @@ do_cloog_backend() {
>      fi
>      
>      CT_DoLog EXTRA "Installing CLooG/ppl"
> -    CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS
> +    CT_DoExecLog ALL make install

Ditto. 

>  }
>  
>  fi # CT_CLOOG
> diff -rupd 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}"       \

Hmm... Unrelated to your changes, but all these _TARGET should go,
they are never defined.

[--SNIP--]
> 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-13 16:26:17.122452838 +0400
> @@ -0,0 +1,122 @@
> +# 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_CLOOG}" = "y" ]; then

This is ISL, not GLooG --> if [ "${CT_ISL}" = "y" ]; then

> +# Download ISL
> +do_isl_get() {
> +    CT_GetFile "isl-0.11.1"  \
> +        ftp://gcc.gnu.org/pub/gcc/infrastructure

Instead of using gcc's copy of ISL, can't we get it directly form the
official ISL upstream?

> +}
> +
> +# Extract ISL
> +do_isl_extract() {
> +    local _t
> +
> +    CT_Extract "isl-0.11.1"
> +
> +    # Help the autostuff in case it thinks there are things to regenerate...
> +    CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/isl-0.11.1/m4"

Is it really needed for isl? Looks like not, as you're not regenerating
the autotools stuff.

> +
> +#    if [ "${CT_CLOOG_NEEDS_AUTORECONF}" = "y" ]; then
> +#        CT_Pushd "${CT_SRC_DIR}/isl-0.11.1"
> +#        CT_DoExecLog CFG ./autogen.sh
> +#        CT_Popd
> +#    fi

Commented code: just remove it.

> +}
> +
> +# 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 cloog_opts

We're speaking about ISL here, not cloog: rename the variable.

[--SNIP--]
> +# Build ISL for running on host
> +do_isl_for_host() {
> +    local -a cloog_opts

Ditto.

Otherwise, this file looks good.

[--SNIP--]
> 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
[--SNIP--]

This file looks good, too.

Thanks for the submission! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
  2013-03-14 23:29 ` [PATCH] Add support for latest CLooG and ISL required by GCC 4.8 Yann E. MORIN
@ 2013-03-15 11:33   ` Steven Newbury
  2013-03-15 17:54     ` Yann E. MORIN
  2013-03-20  9:39   ` Dmitry Plotnikov
  1 sibling, 1 reply; 7+ messages in thread
From: Steven Newbury @ 2013-03-15 11:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Plotnikov Dmitry, crossgcc

On Fri, 2013-03-15 at 00:29 +0100, Yann E. MORIN wrote:
> 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")

This was the case until recently.  GCC trunk no longer uses PPL.


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
  2013-03-15 11:33   ` Steven Newbury
@ 2013-03-15 17:54     ` Yann E. MORIN
  2013-10-23 20:58       ` Carsten Schoenert
  0 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2013-03-15 17:54 UTC (permalink / raw)
  To: Steven Newbury; +Cc: Plotnikov Dmitry, crossgcc

Steven, All,

On Friday 15 March 2013 Steven Newbury wrote:
> On Fri, 2013-03-15 at 00:29 +0100, Yann E. MORIN wrote:
> > 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")
> 
> This was the case until recently.  GCC trunk no longer uses PPL.

OK, so we'll have to rework hos gcc 'selects' PPL.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
  2013-03-14 23:29 ` [PATCH] Add support for latest CLooG and ISL required by GCC 4.8 Yann E. MORIN
  2013-03-15 11:33   ` Steven Newbury
@ 2013-03-20  9:39   ` Dmitry Plotnikov
  2013-03-20 22:35     ` Cody P Schafer
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry Plotnikov @ 2013-03-20  9:39 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

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" <leitz@ispras.ru>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
  2013-03-20  9:39   ` Dmitry Plotnikov
@ 2013-03-20 22:35     ` Cody P Schafer
  0 siblings, 0 replies; 7+ messages in thread
From: Cody P Schafer @ 2013-03-20 22:35 UTC (permalink / raw)
  To: Dmitry Plotnikov; +Cc: Yann E. MORIN, crossgcc

On 03/20/2013 02:38 AM, Dmitry Plotnikov wrote:
>> 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.

Well, we could de-couple the version specification and the source 
"sourcing" (downloading, looking in some directory, et c.)

That way I could have a custom gcc, but also specify the version. You'd 
still need to add some gcc 4.8 references, of course.


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
  2013-03-15 17:54     ` Yann E. MORIN
@ 2013-10-23 20:58       ` Carsten Schoenert
  2013-11-15 13:53         ` Carsten Schoenert
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Schoenert @ 2013-10-23 20:58 UTC (permalink / raw)
  To: crossgcc

Hello Yann,

On 15.03.2013 18:53, Yann E. MORIN wrote:
> Steven, All,
> 
> On Friday 15 March 2013 Steven Newbury wrote:
>> On Fri, 2013-03-15 at 00:29 +0100, Yann E. MORIN wrote:
>>> 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")
>>
>> This was the case until recently.  GCC trunk no longer uses PPL.
> 
> OK, so we'll have to rework hos gcc 'selects' PPL.

I don't know exactly if my build issue is related to this older post,
but I think it depends a little bit on this.

I use the last crosstool-ng release 1.19.0 and try to build a ARM
crosstoolchain with
GCC 4.8.1
Binutils 2.22
EGlibc 2.17
GMP 5.1.1
MPFR 3.1.2
ISL 0.11.1
Cloog 0.18.0
MPC 0.9

The build fails while try to download cloog-ppl-0.18.0 what is wrong I
think as this file nothere exits.
> [ALL  ]    Resolving gcc.gnu.org (gcc.gnu.org)... 209.132.180.131
> [ALL  ]    Connecting to gcc.gnu.org (gcc.gnu.org)|209.132.180.131|:21... connected.
> [ALL  ]    Logging in as anonymous ... Logged in!
> [ALL  ]    ==> SYST ... done.    ==> PWD ... done.
> [ALL  ]    ==> TYPE I ... done.  ==> CWD (1) /pub/gcc/infrastructure ... done.
> [ALL  ]    ==> SIZE cloog-ppl-0.18.0 ... done.
> [ALL  ]    ==> PASV ... done.    ==> RETR cloog-ppl-0.18.0 ... 
> [ALL  ]    No such file 'cloog-ppl-0.18.0'.
> [ALL  ]    
> [ERROR]  
> [ERROR]  >>
> [ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
> [ERROR]  >>        called in step '(top-level)'
> [ERROR]  >>
> [ERROR]  >>  Error happened in: do_cloog_get[scripts/build/companion_libs/cloog.sh@735]
> [ERROR]  >>        called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
> [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@577]
> [ERROR]  >>
> [ERROR]  >>  There is a list of known issues, some with workarounds, in:
> [ERROR]  >>      '/home/carsten/tmp/ctng-build/share/doc/crosstool-ng/ct-ng.1.19.0/B - Known issues.txt'
> [ERROR]  
> [ERROR]  (elapsed: 0:22.01)
> make: *** [build] Fehler 1

Because I don't the interna of crosstool-ng I also don't know which
tunig has to be done. ;)
So any checks I can do?

Regards
Carsten

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add support for latest CLooG and ISL required by GCC 4.8
  2013-10-23 20:58       ` Carsten Schoenert
@ 2013-11-15 13:53         ` Carsten Schoenert
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Schoenert @ 2013-11-15 13:53 UTC (permalink / raw)
  To: crossgcc

Hello,

no one have a good idea?

Am 23.10.2013 22:58, schrieb Carsten Schoenert:
> Hello Yann,
> 
> On 15.03.2013 18:53, Yann E. MORIN wrote:
>> Steven, All,
>>
>> On Friday 15 March 2013 Steven Newbury wrote:
>>> On Fri, 2013-03-15 at 00:29 +0100, Yann E. MORIN wrote:
>>>> 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")
>>>
>>> This was the case until recently.  GCC trunk no longer uses PPL.
>>
>> OK, so we'll have to rework hos gcc 'selects' PPL.
> 
> I don't know exactly if my build issue is related to this older post,
> but I think it depends a little bit on this.
> 
> I use the last crosstool-ng release 1.19.0 and try to build a ARM
> crosstoolchain with
> GCC 4.8.1
> Binutils 2.22
> EGlibc 2.17
> GMP 5.1.1
> MPFR 3.1.2
> ISL 0.11.1
> Cloog 0.18.0
> MPC 0.9
> 
> The build fails while try to download cloog-ppl-0.18.0 what is wrong I
> think as this file nothere exits.
>> [ALL  ]    Resolving gcc.gnu.org (gcc.gnu.org)... 209.132.180.131
>> [ALL  ]    Connecting to gcc.gnu.org (gcc.gnu.org)|209.132.180.131|:21... connected.
>> [ALL  ]    Logging in as anonymous ... Logged in!
>> [ALL  ]    ==> SYST ... done.    ==> PWD ... done.
>> [ALL  ]    ==> TYPE I ... done.  ==> CWD (1) /pub/gcc/infrastructure ... done.
>> [ALL  ]    ==> SIZE cloog-ppl-0.18.0 ... done.
>> [ALL  ]    ==> PASV ... done.    ==> RETR cloog-ppl-0.18.0 ... 
>> [ALL  ]    No such file 'cloog-ppl-0.18.0'.
>> [ALL  ]    
>> [ERROR]  
>> [ERROR]  >>
>> [ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
>> [ERROR]  >>        called in step '(top-level)'
>> [ERROR]  >>
>> [ERROR]  >>  Error happened in: do_cloog_get[scripts/build/companion_libs/cloog.sh@735]
>> [ERROR]  >>        called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
>> [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@577]
>> [ERROR]  >>
>> [ERROR]  >>  There is a list of known issues, some with workarounds, in:
>> [ERROR]  >>      '/home/carsten/tmp/ctng-build/share/doc/crosstool-ng/ct-ng.1.19.0/B - Known issues.txt'
>> [ERROR]  
>> [ERROR]  (elapsed: 0:22.01)
>> make: *** [build] Fehler 1
> 
> Because I don't the interna of crosstool-ng I also don't know which
> tunig has to be done. ;)
> So any checks I can do?
> 
> Regards
> Carsten
> 

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-15 13:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5141DCFC.1070408@ispras.ru>
2013-03-14 23:29 ` [PATCH] Add support for latest CLooG and ISL required by GCC 4.8 Yann E. MORIN
2013-03-15 11:33   ` Steven Newbury
2013-03-15 17:54     ` Yann E. MORIN
2013-10-23 20:58       ` Carsten Schoenert
2013-11-15 13:53         ` Carsten Schoenert
2013-03-20  9:39   ` Dmitry Plotnikov
2013-03-20 22:35     ` Cody P Schafer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).