Il giorno Thu, 22 Dec 2016 21:11:45 +0100
Michał Górny <mgo...@gentoo.org> ha scritto:

> On Thu, 22 Dec 2016 14:55:05 +0100
> Alfredo Tupone <tup...@gentoo.org> wrote:
> 
> > > > 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  
> 
> To be honest, I don't like this at all. This sounds like doubling
> the effort on maintaining gcc, and it sounds like people using
> GNAT-GPL would end up being forced to use old versions of GCC (also
> possibly missing patches).
All the patch that we (gentoo) apply to sys-devel/gcc-4.7.4 are applied
to gnat-gpl without any changes. Well I actually did two small patches
to the piepatches that apply to gcc, but the rest goes well.
It seems that gcc-4.7.4 and gcc included in gnat-gpl-2014 are very near.

I have still to check the newest 2015 (4.9.3) and 2016 (4.9.4) version.

The other path to provide gnat compiler to gentoo is using the one in
the FSF gcc. 
The advantage are 
a) that you don't have two gcc to align,
b) you can compile closed source.
but 
a) when you provide a new version of gcc you also need to check the
ada compiler
b) the ada compiler is an older version even if it is running on a new
gcc
> 
> If the Ada compiler requires Ada to boostrap anyway, can't you just
> make it build the Ada compiler alone?
> 
To bootstrap it needs a C, C++, and an Ada Compiler. and they should be
provided by using the gcc driver. (At least without changing a lot the
compilation scripts). So a standalone ada compiler cannot be used to
boostrap.

More over, as the gnat provide interfaces between languages, the layer
of interface between Ada and C++ depends on the version.
Sometimes happened that Ada and C++ had problems for differences in
the vtable layout (if I remember well, when going from gcc-3 to
gcc-4), or in mangling (gcc-2.8.1 to gcc-3, yes long time ago)
that caused problems when passing objects between languages. It
is better that the version of C++ and Ada used in a program are aligned.

If both are provided by the same gcc, that is automatic.

Reply via email to