Patchwork Move Graphite from using PPL over to ISL

login
register
mail settings
Submitter Tristan Gingold
Date July 4, 2012, 11:04 a.m.
Message ID <70EA4DC5-0808-429F-89E9-C38D147CA287@adacore.com>
Download mbox | patch
Permalink /patch/168950/
State New
Headers show

Comments

Tristan Gingold - July 4, 2012, 11:04 a.m.
On Jul 4, 2012, at 12:59 PM, Richard Guenther wrote:

> On Wed, 4 Jul 2012, Tristan Gingold wrote:
> 
>> 
>> On Jul 4, 2012, at 12:32 PM, Richard Guenther wrote:
>> 
>>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
>>> 
>>>> 
>>>> On Jul 4, 2012, at 10:58 AM, Richard Guenther wrote:
>>>> 
>>>>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
>>>>> 
>>>>>> 
>>>>>> On Jul 2, 2012, at 1:43 PM, Richard Guenther wrote:
>>>>>> 
>>>>>>> On Thu, 28 Jun 2012, Diego Novillo wrote:
>>>>>>> 
>>>>>>>> On 12-06-27 11:06 , Richard Guenther wrote:
>>>>>>>> 
>>>>>>>>> 2012-06-27  Richard Guenther  <rguenther@suse.de>
>>>>>>>>> 	Michael Matz  <matz@suse.de>
>>>>>>>>> 	Tobias Grosser <tobias@grosser.es>
>>>>>>>>> 	Sebastian Pop <sebpop@gmail.com>
>>>>>>>>> 
>>>>>>>>> 	config/
>>>>>>>>> 	* cloog.m4: Set up to work against ISL only.
>>>>>>>>> 	* isl.m4: New file.
>>>>>> 
>>>>>> Shouldn't ENABLE_IS_CHECK be automatically set to no when building a cross canadian ?
>>>>> 
>>>>> Probably yes, as it is a runtime test.  Thus at any time when host != 
>>>>> build.  Care to post a patch?  You probably know best what the canonical
>>>>> way to check this is.
>>>> 
>>>> Something like that ?
>>>> 
>>>> Tested by building a cross and a canadian for ia64-hp-openvms.
>>> 
>>> Seems to be an incremental patch ontop of the real patch?
>> 
>> No, what does make you think so ?
>> 
>> That's an incremental patch on top of many VMS specific unrelated patches, but this is the real patch: building a cross compiler fails without it.
> 
> Well,
> 
> diff --git a/config/isl.m4 b/config/isl.m4
> index 152d422..831ac26 100644
> --- a/config/isl.m4
> +++ b/config/isl.m4
> @@ -103,7 +103,7 @@ AC_DEFUN([ISL_REQUESTED],
> 
> # _ISL_CHECK_CT_PROG(MAJOR, MINOR)
> # --------------------------------------------
> -# Helper for verifying CLooG's compile time version.
> +# Helper for verifying ISL compile time version.
> m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
>   [#include <isl/version.h>
>        [gcc_cv_isl=yes],
> -       [gcc_cv_isl=no])])
> +       [gcc_cv_isl=no],
> +       [gcc_cv_isl=yes])])
> 
>     CFLAGS=$_isl_saved_CFLAGS
>     LDFLAGS=$_isl_saved_LDFLAGS
> 
> Does not apply for me - there seems to be lines missing.  I guess
> the 2nd hunk is for

Arggh, indeed it was truncated.  Here is the correct one.

Tristan.

2012-07-04  Tristan Gingold  <gingold@adacore.com>

	* configure: Regenerate.

config/
2012-07-04  Tristan Gingold  <gingold@adacore.com>

	* isl.m4 (ISL_CHECK_VERSION): Set to yes if cross-compiling.
	Fix comments.
Richard Guenther - July 4, 2012, 11:07 a.m.
On Wed, 4 Jul 2012, Tristan Gingold wrote:

> 
> On Jul 4, 2012, at 12:59 PM, Richard Guenther wrote:
> 
> > On Wed, 4 Jul 2012, Tristan Gingold wrote:
> > 
> >> 
> >> On Jul 4, 2012, at 12:32 PM, Richard Guenther wrote:
> >> 
> >>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
> >>> 
> >>>> 
> >>>> On Jul 4, 2012, at 10:58 AM, Richard Guenther wrote:
> >>>> 
> >>>>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
> >>>>> 
> >>>>>> 
> >>>>>> On Jul 2, 2012, at 1:43 PM, Richard Guenther wrote:
> >>>>>> 
> >>>>>>> On Thu, 28 Jun 2012, Diego Novillo wrote:
> >>>>>>> 
> >>>>>>>> On 12-06-27 11:06 , Richard Guenther wrote:
> >>>>>>>> 
> >>>>>>>>> 2012-06-27  Richard Guenther  <rguenther@suse.de>
> >>>>>>>>> 	Michael Matz  <matz@suse.de>
> >>>>>>>>> 	Tobias Grosser <tobias@grosser.es>
> >>>>>>>>> 	Sebastian Pop <sebpop@gmail.com>
> >>>>>>>>> 
> >>>>>>>>> 	config/
> >>>>>>>>> 	* cloog.m4: Set up to work against ISL only.
> >>>>>>>>> 	* isl.m4: New file.
> >>>>>> 
> >>>>>> Shouldn't ENABLE_IS_CHECK be automatically set to no when building a cross canadian ?
> >>>>> 
> >>>>> Probably yes, as it is a runtime test.  Thus at any time when host != 
> >>>>> build.  Care to post a patch?  You probably know best what the canonical
> >>>>> way to check this is.
> >>>> 
> >>>> Something like that ?
> >>>> 
> >>>> Tested by building a cross and a canadian for ia64-hp-openvms.
> >>> 
> >>> Seems to be an incremental patch ontop of the real patch?
> >> 
> >> No, what does make you think so ?
> >> 
> >> That's an incremental patch on top of many VMS specific unrelated patches, but this is the real patch: building a cross compiler fails without it.
> > 
> > Well,
> > 
> > diff --git a/config/isl.m4 b/config/isl.m4
> > index 152d422..831ac26 100644
> > --- a/config/isl.m4
> > +++ b/config/isl.m4
> > @@ -103,7 +103,7 @@ AC_DEFUN([ISL_REQUESTED],
> > 
> > # _ISL_CHECK_CT_PROG(MAJOR, MINOR)
> > # --------------------------------------------
> > -# Helper for verifying CLooG's compile time version.
> > +# Helper for verifying ISL compile time version.
> > m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
> >   [#include <isl/version.h>
> >        [gcc_cv_isl=yes],
> > -       [gcc_cv_isl=no])])
> > +       [gcc_cv_isl=no],
> > +       [gcc_cv_isl=yes])])
> > 
> >     CFLAGS=$_isl_saved_CFLAGS
> >     LDFLAGS=$_isl_saved_LDFLAGS
> > 
> > Does not apply for me - there seems to be lines missing.  I guess
> > the 2nd hunk is for
> 
> Arggh, indeed it was truncated.  Here is the correct one.

;)

Ok.

Thanks,
Richard.

> Tristan.
> 
> 2012-07-04  Tristan Gingold  <gingold@adacore.com>
> 
> 	* configure: Regenerate.
> 
> config/
> 2012-07-04  Tristan Gingold  <gingold@adacore.com>
> 
> 	* isl.m4 (ISL_CHECK_VERSION): Set to yes if cross-compiling.
> 	Fix comments.
>  
> 
> diff --git a/config/isl.m4 b/config/isl.m4
> index 152d422..4f39724 100644
> --- a/config/isl.m4
> +++ b/config/isl.m4
> @@ -84,7 +84,7 @@ AC_DEFUN([ISL_INIT_FLAGS],
>  
>  # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
>  # ----------------------------------------------------
> -# Provide actions for failed CLooG detection.
> +# Provide actions for failed ISL detection.
>  AC_DEFUN([ISL_REQUESTED],
>  [
>    AC_REQUIRE([ISL_INIT_FLAGS])
> @@ -103,7 +103,7 @@ AC_DEFUN([ISL_REQUESTED],
>  
>  # _ISL_CHECK_CT_PROG(MAJOR, MINOR)
>  # --------------------------------------------
> -# Helper for verifying CLooG's compile time version.
> +# Helper for verifying ISL compile time version.
>  m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
>    [#include <isl/version.h>
>     #include <string.h>],
> @@ -131,7 +131,8 @@ AC_DEFUN([ISL_CHECK_VERSION],
>        [gcc_cv_isl],
>        [AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
>  	[gcc_cv_isl=yes],
> -	[gcc_cv_isl=no])])
> +	[gcc_cv_isl=no],
> +	[gcc_cv_isl=yes])])
>  
>      CFLAGS=$_isl_saved_CFLAGS
>      LDFLAGS=$_isl_saved_LDFLAGS
> 
>
Tristan Gingold - July 4, 2012, 12:28 p.m.
On Jul 4, 2012, at 1:07 PM, Richard Guenther wrote:

> On Wed, 4 Jul 2012, Tristan Gingold wrote:
> 
>> 
>> On Jul 4, 2012, at 12:59 PM, Richard Guenther wrote:
>> 
>>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
>>> 
>>>> 
>>>> On Jul 4, 2012, at 12:32 PM, Richard Guenther wrote:
>>>> 
>>>>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
>>>>> 
>>>>>> 
>>>>>> On Jul 4, 2012, at 10:58 AM, Richard Guenther wrote:
>>>>>> 
>>>>>>> On Wed, 4 Jul 2012, Tristan Gingold wrote:
>>>>>>> 
>>>>>>>> 
>>>>>>>> On Jul 2, 2012, at 1:43 PM, Richard Guenther wrote:
>>>>>>>> 
>>>>>>>>> On Thu, 28 Jun 2012, Diego Novillo wrote:
>>>>>>>>> 
>>>>>>>>>> On 12-06-27 11:06 , Richard Guenther wrote:
>>>>>>>>>> 
>>>>>>>>>>> 2012-06-27  Richard Guenther  <rguenther@suse.de>
>>>>>>>>>>> 	Michael Matz  <matz@suse.de>
>>>>>>>>>>> 	Tobias Grosser <tobias@grosser.es>
>>>>>>>>>>> 	Sebastian Pop <sebpop@gmail.com>
>>>>>>>>>>> 
>>>>>>>>>>> 	config/
>>>>>>>>>>> 	* cloog.m4: Set up to work against ISL only.
>>>>>>>>>>> 	* isl.m4: New file.
>>>>>>>> 
>>>>>>>> Shouldn't ENABLE_IS_CHECK be automatically set to no when building a cross canadian ?
>>>>>>> 
>>>>>>> Probably yes, as it is a runtime test.  Thus at any time when host != 
>>>>>>> build.  Care to post a patch?  You probably know best what the canonical
>>>>>>> way to check this is.
>>>>>> 
>>>>>> Something like that ?
>>>>>> 
>>>>>> Tested by building a cross and a canadian for ia64-hp-openvms.
>>>>> 
>>>>> Seems to be an incremental patch ontop of the real patch?
>>>> 
>>>> No, what does make you think so ?
>>>> 
>>>> That's an incremental patch on top of many VMS specific unrelated patches, but this is the real patch: building a cross compiler fails without it.
>>> 
>>> Well,
>>> 
>>> diff --git a/config/isl.m4 b/config/isl.m4
>>> index 152d422..831ac26 100644
>>> --- a/config/isl.m4
>>> +++ b/config/isl.m4
>>> @@ -103,7 +103,7 @@ AC_DEFUN([ISL_REQUESTED],
>>> 
>>> # _ISL_CHECK_CT_PROG(MAJOR, MINOR)
>>> # --------------------------------------------
>>> -# Helper for verifying CLooG's compile time version.
>>> +# Helper for verifying ISL compile time version.
>>> m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
>>>  [#include <isl/version.h>
>>>       [gcc_cv_isl=yes],
>>> -       [gcc_cv_isl=no])])
>>> +       [gcc_cv_isl=no],
>>> +       [gcc_cv_isl=yes])])
>>> 
>>>    CFLAGS=$_isl_saved_CFLAGS
>>>    LDFLAGS=$_isl_saved_LDFLAGS
>>> 
>>> Does not apply for me - there seems to be lines missing.  I guess
>>> the 2nd hunk is for
>> 
>> Arggh, indeed it was truncated.  Here is the correct one.
> 
> ;)
> 
> Ok.

Now committed.

Thanks for your quick answer
(and sorry for sending broken patches).

Tristan.
Magnus Fromreide - July 4, 2012, 6:31 p.m.
Hello.

Ever since the ISL patch went in my builds have failed.

I am building with local copies of all the libraries, so I have added
gmp, mpfr, mpc, isl and cloog from ftp://gcc.gnu.org/pub/gcc/infrastructure
to my source directory.

The command sequence I use is

svn co svn://gcc.gnu.org/svn/gcc/trunk
cd trunk
./contrib/download_prerequisites
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.17.0.tar.gz ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.10.tar.bz2
tar xjf isl-0.10.tar.bz2
tar xzf cloog-0.17.0.tar.gz
ln -s cloog-0.17.0 cloog
ln -s isl-0.10 isl
cd ..
mkdir build
cd build
../trunk/configure
make V=1

and the error message I get is

make[5]: Entering directory `/home/maf/src/gcc/build/isl'
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H  -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/  -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/      -g -fkeep-inline-functions -MT libisl_la-isl_lp_no_piplib.lo -MD -MP -MF .deps/libisl_la-isl_lp_no_piplib.Tpo -c -o libisl_la-isl_lp_no_piplib.lo `test -f 'isl_lp_no_piplib.c' || echo '../../trunk/isl/'`isl_lp_no_piplib.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/ -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/ -g -fkeep-inline-functions -MT libisl_la-isl_lp_no_piplib.lo -MD -MP -MF .deps/libisl_la-isl_lp_no_piplib.Tpo -c ../../trunk/isl/isl_lp_no_piplib.c -o libisl_la-isl_lp_no_piplib.o
In file included from ../../trunk/isl/include/isl/lp.h:13:0,
                 from ../../trunk/isl/isl_lp_piplib.h:13,
                 from ../../trunk/isl/isl_lp_no_piplib.c:10:
../../trunk/isl/include/isl/int.h:15:17: fatal error: gmp.h: No such file or directory
compilation terminated.
make[5]: *** [libisl_la-isl_lp_no_piplib.lo] Error 1
make[5]: Leaving directory `/home/maf/src/gcc/build/isl'
Making all in doc
make[5]: Entering directory `/home/maf/src/gcc/build/isl/doc'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/maf/src/gcc/build/isl/doc'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/maf/src/gcc/build/isl'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/maf/src/gcc/build/isl'
make[2]: *** [all-stage1-isl] Error 2
make[2]: Leaving directory `/home/maf/src/gcc/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/maf/src/gcc/build'
make: *** [all] Error 2

but 'ls gmp/gmp.h' shows that the file is there.

Please note that my machine lack the gmp-devel package, so there is no
/usr/include/gmp.h.

Adding that package makes the build succeed, but that sounds ridiculous as
there is a local copy.

/MF
Tristan Gingold - July 5, 2012, 7:26 a.m.
On Jul 4, 2012, at 8:31 PM, Magnus Fromreide wrote:

> Hello.
> 
> Ever since the ISL patch went in my builds have failed.

Which ISL patch ?

> I am building with local copies of all the libraries, so I have added
> gmp, mpfr, mpc, isl and cloog from ftp://gcc.gnu.org/pub/gcc/infrastructure
> to my source directory.

I am not familiar with this build (I usually build gmp/mpfr/... once and install them).
But it looks like isl doesn't see the gmp includes.  But according to $(srcdir)/Makefile.in,
gmp is configured with --with-gmp-include.  Was isl correctly configured in your case ?

Tristan.

> 
> The command sequence I use is
> 
> svn co svn://gcc.gnu.org/svn/gcc/trunk
> cd trunk
> ./contrib/download_prerequisites
> wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.17.0.tar.gz ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.10.tar.bz2
> tar xjf isl-0.10.tar.bz2
> tar xzf cloog-0.17.0.tar.gz
> ln -s cloog-0.17.0 cloog
> ln -s isl-0.10 isl
> cd ..
> mkdir build
> cd build
> ../trunk/configure
> make V=1
> 
> and the error message I get is
> 
> make[5]: Entering directory `/home/maf/src/gcc/build/isl'
> /bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H  -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/  -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/      -g -fkeep-inline-functions -MT libisl_la-isl_lp_no_piplib.lo -MD -MP -MF .deps/libisl_la-isl_lp_no_piplib.Tpo -c -o libisl_la-isl_lp_no_piplib.lo `test -f 'isl_lp_no_piplib.c' || echo '../../trunk/isl/'`isl_lp_no_piplib.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/ -I. -I../../trunk/isl -I../../trunk/isl/include -Iinclude/ -g -fkeep-inline-functions -MT libisl_la-isl_lp_no_piplib.lo -MD -MP -MF .deps/libisl_la-isl_lp_no_piplib.Tpo -c ../../trunk/isl/isl_lp_no_piplib.c -o libisl_la-isl_lp_no_piplib.o
> In file included from ../../trunk/isl/include/isl/lp.h:13:0,
>                 from ../../trunk/isl/isl_lp_piplib.h:13,
>                 from ../../trunk/isl/isl_lp_no_piplib.c:10:
> ../../trunk/isl/include/isl/int.h:15:17: fatal error: gmp.h: No such file or directory
> compilation terminated.
> make[5]: *** [libisl_la-isl_lp_no_piplib.lo] Error 1
> make[5]: Leaving directory `/home/maf/src/gcc/build/isl'
> Making all in doc
> make[5]: Entering directory `/home/maf/src/gcc/build/isl/doc'
> make[5]: Nothing to be done for `all'.
> make[5]: Leaving directory `/home/maf/src/gcc/build/isl/doc'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/home/maf/src/gcc/build/isl'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/home/maf/src/gcc/build/isl'
> make[2]: *** [all-stage1-isl] Error 2
> make[2]: Leaving directory `/home/maf/src/gcc/build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/home/maf/src/gcc/build'
> make: *** [all] Error 2
> 
> but 'ls gmp/gmp.h' shows that the file is there.
> 
> Please note that my machine lack the gmp-devel package, so there is no
> /usr/include/gmp.h.
> 
> Adding that package makes the build succeed, but that sounds ridiculous as
> there is a local copy.
> 
> /MF
Richard Guenther - July 5, 2012, 8:20 a.m.
On Thu, 5 Jul 2012, Tristan Gingold wrote:

> 
> On Jul 4, 2012, at 8:31 PM, Magnus Fromreide wrote:
> 
> > Hello.
> > 
> > Ever since the ISL patch went in my builds have failed.
> 
> Which ISL patch ?
> 
> > I am building with local copies of all the libraries, so I have added
> > gmp, mpfr, mpc, isl and cloog from ftp://gcc.gnu.org/pub/gcc/infrastructure
> > to my source directory.
> 
> I am not familiar with this build (I usually build gmp/mpfr/... once and install them).
> But it looks like isl doesn't see the gmp includes.  But according to $(srcdir)/Makefile.in,
> gmp is configured with --with-gmp-include.  Was isl correctly configured in your case ?

I have not tested builds with gmp/mpfr in the source tree but have
copied the logic from the old ppl/cloog configury.  Can you try
to replace $$r/$(HOST_SUBDIR)/gmp with $$s/gmp in Makefile.def?
The issue is we can't specify both source and build dirs here
(so the underlying issue is packages expect installed gmp but we don't
actually install it - they are not expecting to be used as-is in
their build directory).

Richard.

Patch

diff --git a/config/isl.m4 b/config/isl.m4
index 152d422..4f39724 100644
--- a/config/isl.m4
+++ b/config/isl.m4
@@ -84,7 +84,7 @@  AC_DEFUN([ISL_INIT_FLAGS],
 
 # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
 # ----------------------------------------------------
-# Provide actions for failed CLooG detection.
+# Provide actions for failed ISL detection.
 AC_DEFUN([ISL_REQUESTED],
 [
   AC_REQUIRE([ISL_INIT_FLAGS])
@@ -103,7 +103,7 @@  AC_DEFUN([ISL_REQUESTED],
 
 # _ISL_CHECK_CT_PROG(MAJOR, MINOR)
 # --------------------------------------------
-# Helper for verifying CLooG's compile time version.
+# Helper for verifying ISL compile time version.
 m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
   [#include <isl/version.h>
    #include <string.h>],
@@ -131,7 +131,8 @@  AC_DEFUN([ISL_CHECK_VERSION],
       [gcc_cv_isl],
       [AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
 	[gcc_cv_isl=yes],
-	[gcc_cv_isl=no])])
+	[gcc_cv_isl=no],
+	[gcc_cv_isl=yes])])
 
     CFLAGS=$_isl_saved_CFLAGS
     LDFLAGS=$_isl_saved_LDFLAGS