Gentoo Archives: gentoo-dev

From: Alfredo Tupone <tupone@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Changes in toolchain.eclass to enable Ada
Date: Thu, 22 Dec 2016 21:25:45
Message-Id: 20161222222531.268e9ad5@alfredo-i5
In Reply to: Re: [gentoo-dev] Changes in toolchain.eclass to enable Ada by "Michał Górny"
1 Il giorno Thu, 22 Dec 2016 21:11:45 +0100
2 Michał Górny <mgorny@g.o> ha scritto:
3
4 > On Thu, 22 Dec 2016 14:55:05 +0100
5 > Alfredo Tupone <tupone@g.o> wrote:
6 >
7 > > > > I would like to start including, in the gentoo tree, GNAT-GPL
8 > > > > built in the same way as sys-devel-gcc and selectable with
9 > > > > gcc-config
10 > > >
11 > > > 1. Does this mean that GNAT-GPL build will include building a C
12 > > > compiler? If yes, will the C compiler be installed?
13 > > Yes, a C and a C++ compiler, and they will be installed
14 > > >
15 > > > 2. Will it be possible to combine GNAT-GPL with a different
16 > > > version of regular gcc C/C++ compilers?
17 > > No, not easily
18 >
19 > To be honest, I don't like this at all. This sounds like doubling
20 > the effort on maintaining gcc, and it sounds like people using
21 > GNAT-GPL would end up being forced to use old versions of GCC (also
22 > possibly missing patches).
23 All the patch that we (gentoo) apply to sys-devel/gcc-4.7.4 are applied
24 to gnat-gpl without any changes. Well I actually did two small patches
25 to the piepatches that apply to gcc, but the rest goes well.
26 It seems that gcc-4.7.4 and gcc included in gnat-gpl-2014 are very near.
27
28 I have still to check the newest 2015 (4.9.3) and 2016 (4.9.4) version.
29
30 The other path to provide gnat compiler to gentoo is using the one in
31 the FSF gcc.
32 The advantage are
33 a) that you don't have two gcc to align,
34 b) you can compile closed source.
35 but
36 a) when you provide a new version of gcc you also need to check the
37 ada compiler
38 b) the ada compiler is an older version even if it is running on a new
39 gcc
40 >
41 > If the Ada compiler requires Ada to boostrap anyway, can't you just
42 > make it build the Ada compiler alone?
43 >
44 To bootstrap it needs a C, C++, and an Ada Compiler. and they should be
45 provided by using the gcc driver. (At least without changing a lot the
46 compilation scripts). So a standalone ada compiler cannot be used to
47 boostrap.
48
49 More over, as the gnat provide interfaces between languages, the layer
50 of interface between Ada and C++ depends on the version.
51 Sometimes happened that Ada and C++ had problems for differences in
52 the vtable layout (if I remember well, when going from gcc-3 to
53 gcc-4), or in mangling (gcc-2.8.1 to gcc-3, yes long time ago)
54 that caused problems when passing objects between languages. It
55 is better that the version of C++ and Ada used in a program are aligned.
56
57 If both are provided by the same gcc, that is automatic.