On 13:49 Thu 22 Dec     , Michał Górny wrote:
> On Wed, 21 Dec 2016 23:00:47 +0100
> Alfredo Tupone <tup...@gentoo.org> wrote:
> 
> > I would like to revive the Ada support in gentoo.
> > 
> > One ada compiler is produced by AdaCore and is provided in three
> > versions, in the order starting from the best supported :
> > 
> > 1) GnatPro, available with a contract support.
> > 
> > 2) Gnat-GPL that can only build GPL-3 product
> > 
> > 3) The gnat included in the gcc tree that is GPL-3 with exception.
> > 
> > Gnat-GPL is very like the gnat in the gcc-tree so it can be built in
> > the same way of sys-devel/gcc
> > 
> > To be compiled from source the gcc compiler needs a C, C++, and Ada
> > Compiler. I will provide one with the gnat-gpl-bin tar that could be
> > installed under /opt . When the gcc is properly compiled we don't need
> > it any more.
> 
> Do I correctly understand that this is also true for gnat-gpl? Is there
> any Ada compiler that could be used to bootstrap Ada on platforms that
> lack prebuilt binaries?
There is no difference between gcc and gnat-gpl.
>From what I see adacore take a snapshot of gcc and make its own changes to
add ada supports.
So gnat-gpl needs a gnat compiler to be built, like vanilla gcc does.

>From my research on internet adacore "guarantees" that the compiler can be
built with itself or a version "-1" of it. Normally any version of a gnat
compiler that is enough near can build it, but, without any big work, I don't 
expect that either gcc or gnat-gpl can be built with other non gcc/gnat Ada 
compilers.
I have read of gcc ada compilers built on several platforms using cross
compilation. Maybe those could be used, like suggested in
https://bugs.gentoo.org/show_bug.cgi?id=592060
However I am for adding the boostrap via the binary provided by adacore
only, via gnat-gpl-bin packages. At least for the beginning.

> 
> > I would like to start including, in the gentoo tree, GNAT-GPL
> > built in the same way as sys-devel-gcc and selectable with gcc-config
> 
> 1. Does this mean that GNAT-GPL build will include building a C
> compiler? If yes, will the C compiler be installed?
Yes, a C and a C++ compiler, and they will be installed
> 
> 2. Will it be possible to combine GNAT-GPL with a different version of
> regular gcc C/C++ compilers?
No, not easily
> 
> > As for instance gnat-gpl-2014 is based on gcc-4.7.4 they cannot coexist
> > and gnat-gpl-2014 will block sys-devel/gcc-4.7.4
> 
> Block the whole sys-devel/ or just sys-devel/gcc[ada]?
Block the whole sys-devel/gcc-4.7.4
> 
> > As a reference I have my overlay on https://github.com/atupone/overlay
> > and a pull request at https://github.com/gentoo/gentoo/pull/3186
> > 
> > To start I need to change the toolchain.eclass 
> > 
> > -   tc_version_is_at_least 4.7 && IUSE+=" go"
> > +   tc_version_is_at_least 4.7 && IUSE+=" go ada"
> > 
> > -   # We do NOT want 'ADA support' in here!
> > -   # is_ada && GCC_LANG+=",ada"
> > +   # We do want 'ADA support' here!
> > +   is_ada && GCC_LANG+=",ada" 
> > 
> > -   for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
> > +   for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo gnatbind; do 
> > 
> > Thats all for that.
> > 
> > Then, to not change the behaviour of the gcc-compiler, we could mask the
> > ada use flag for sys-devel/gcc, at least temporarily
> > 
> > ---------------------
> > 
> > I would like to have comments on that, particularly because:
> > a) it is going to add a use flag to sys-devel/gcc that will bring gcc
> > to be rebuilt on most system, 
> 
> That's a minor problem. Toolchain people do this on us all the time,
> so...
> 
> > b) the gnat-gpl, if selected with gcc-config, can be used to recompile
> > all the system, and maybe is not so good ?
> 
> I don't really understand what you mean here. But it's probably related
> to the questions I asked above.
> 
> -- 
> Best regards,
> Michał Górny
> <http://dev.gentoo.org/~mgorny/>



Reply via email to