diff mbox

Move Graphite from using PPL over to ISL

Message ID alpine.LNX.2.00.1207051144420.17233@jbgna.fhfr.qr
State New
Headers show

Commit Message

Richard Biener July 5, 2012, 9:46 a.m. UTC
On Thu, 5 Jul 2012, Richard Guenther wrote:

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

Looking at isl/cloog configure in detail it seems that the following might
work (tested with all reqs in tree only yet).  Hopefully it autodetects
the case where the build dir does not exist and uses the system library
instead then (of course alternate gmp install dirs are still not properly
passed down I guess).

Richard.

                no_install= true; };
 host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
                extra_configure_flags='--disable-shared';

Comments

Richard Biener July 5, 2012, 9:51 a.m. UTC | #1
On Thu, 5 Jul 2012, Richard Guenther wrote:

> On Thu, 5 Jul 2012, Richard Guenther wrote:
> 
> > 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).
> 
> Looking at isl/cloog configure in detail it seems that the following might
> work (tested with all reqs in tree only yet).  Hopefully it autodetects
> the case where the build dir does not exist and uses the system library
> instead then (of course alternate gmp install dirs are still not properly
> passed down I guess).

Does not work with out-of-tree gmp.  Any suggestion on how to
conditionalize Makefile.def extra_configure_flags on the presence
of a host_module?

Richard.

> Index: Makefile.def
> ===================================================================
> --- Makefile.def        (revision 189263)
> +++ Makefile.def        (working copy)
> @@ -62,12 +62,12 @@ host_modules= { module= mpc; lib_path=.l
>                 extra_configure_flags='--disable-shared 
> @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
>                 no_install= true; };
>  host_modules= { module= isl; lib_path=.libs; bootstrap=true;
> -               extra_configure_flags='--disable-shared 
> --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs 
> --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp';
> +               extra_configure_flags='--disable-shared 
> --with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp';
> +               extra_make_flags='V=1';
>                 no_install= true; };
>  host_modules= { module= cloog; lib_path=.libs; bootstrap=true;
> -               extra_configure_flags='--disable-shared 
> --with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs 
> --with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp 
> --with-isl=system';
> -               extra_exports='CPPFLAGS="-I$$r/$(HOST_SUBDIR)/isl/include 
> -I$$s/isl/include $$CPPFLAGS"; export CPPFLAGS; 
> LDFLAGS="-L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; ';
> -               extra_make_flags='CPPFLAGS="$$CPPFLAGS" 
> LDFLAGS="$$LDFLAGS" V=1';
> +               extra_configure_flags='--disable-shared 
> --with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp 
> --with-isl-builddir=$$r/$(HOST_SUBDIR)/isl --with-bits=gmp';
> +               extra_make_flags='V=1';
>                 no_install= true; };
>  host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
>                 extra_configure_flags='--disable-shared';
>
Magnus Fromreide July 5, 2012, 7:44 p.m. UTC | #2
On Thu, Jul 05, 2012 at 11:51:19AM +0200, Richard Guenther wrote:
> On Thu, 5 Jul 2012, Richard Guenther wrote:
> 
> > On Thu, 5 Jul 2012, Richard Guenther wrote:
> > 
> > > 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).
> > 
> > Looking at isl/cloog configure in detail it seems that the following might
> > work (tested with all reqs in tree only yet).  Hopefully it autodetects
> > the case where the build dir does not exist and uses the system library
> > instead then (of course alternate gmp install dirs are still not properly
> > passed down I guess).
> 
> Does not work with out-of-tree gmp.  Any suggestion on how to
> conditionalize Makefile.def extra_configure_flags on the presence
> of a host_module?

First, sorry for not having been able to get back to you earlier.

I agree. That AX_SUBMODULE macro is somewhat annoying, it seems the main use
of it is so that ISL can get hold of the srcdir for an uninstalled build when
it is used in the context of gmp.

Now, if I build with --with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp then it works
in my setup.

If we suppose that gmp is installed with headers under /some/place/include and
libs under /another/place/lib then one could use

  --with-gmp-prefix=/some/place --with-gmp-exec-prefix=/another/place

except that there is a bug in the ISL configure script so it uses gmp-prefix
for both include and lib, and this also requires that the include and lib parts
of the paths are there.

Would it be possible to actually install  the libraries somewhere under build
and then link against them?

/MF
Richard Biener July 6, 2012, 8:26 a.m. UTC | #3
On Thu, 5 Jul 2012, Magnus Fromreide wrote:

> On Thu, Jul 05, 2012 at 11:51:19AM +0200, Richard Guenther wrote:
> > On Thu, 5 Jul 2012, Richard Guenther wrote:
> > 
> > > On Thu, 5 Jul 2012, Richard Guenther wrote:
> > > 
> > > > 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).
> > > 
> > > Looking at isl/cloog configure in detail it seems that the following might
> > > work (tested with all reqs in tree only yet).  Hopefully it autodetects
> > > the case where the build dir does not exist and uses the system library
> > > instead then (of course alternate gmp install dirs are still not properly
> > > passed down I guess).
> > 
> > Does not work with out-of-tree gmp.  Any suggestion on how to
> > conditionalize Makefile.def extra_configure_flags on the presence
> > of a host_module?
> 
> First, sorry for not having been able to get back to you earlier.
> 
> I agree. That AX_SUBMODULE macro is somewhat annoying, it seems the main use
> of it is so that ISL can get hold of the srcdir for an uninstalled build when
> it is used in the context of gmp.
> 
> Now, if I build with --with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp then it works
> in my setup.
> 
> If we suppose that gmp is installed with headers under /some/place/include and
> libs under /another/place/lib then one could use
> 
>   --with-gmp-prefix=/some/place --with-gmp-exec-prefix=/another/place
> 
> except that there is a bug in the ISL configure script so it uses gmp-prefix
> for both include and lib, and this also requires that the include and lib parts
> of the paths are there.
> 
> Would it be possible to actually install  the libraries somewhere under build
> and then link against them?

Yes, I think that would be the most clean solution - unfortunately
the current setup of the toplevel hierarchy does not support this
(easily, at least).  A way out would be to always claim stuff is
installed - thus, use the =system variants and add more flags to
pass through, similar to the cloog variant.  There we can easily
add both source and build dir includes - but it gets very messy
easily.

Richard.
diff mbox

Patch

Index: Makefile.def
===================================================================
--- Makefile.def        (revision 189263)
+++ Makefile.def        (working copy)
@@ -62,12 +62,12 @@  host_modules= { module= mpc; lib_path=.l
                extra_configure_flags='--disable-shared 
@extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
                no_install= true; };
 host_modules= { module= isl; lib_path=.libs; bootstrap=true;
-               extra_configure_flags='--disable-shared 
--with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs 
--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp';
+               extra_configure_flags='--disable-shared 
--with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp';
+               extra_make_flags='V=1';
                no_install= true; };
 host_modules= { module= cloog; lib_path=.libs; bootstrap=true;
-               extra_configure_flags='--disable-shared 
--with-gmp-library=$$r/$(HOST_SUBDIR)/gmp/.libs 
--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-bits=gmp 
--with-isl=system';
-               extra_exports='CPPFLAGS="-I$$r/$(HOST_SUBDIR)/isl/include 
-I$$s/isl/include $$CPPFLAGS"; export CPPFLAGS; 
LDFLAGS="-L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; ';
-               extra_make_flags='CPPFLAGS="$$CPPFLAGS" 
LDFLAGS="$$LDFLAGS" V=1';
+               extra_configure_flags='--disable-shared 
--with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp 
--with-isl-builddir=$$r/$(HOST_SUBDIR)/isl --with-bits=gmp';
+               extra_make_flags='V=1';