1 |
On 13:49 Thu 22 Dec , Michał Górny wrote: |
2 |
> On Wed, 21 Dec 2016 23:00:47 +0100 |
3 |
> Alfredo Tupone <tupone@g.o> wrote: |
4 |
> |
5 |
> > I would like to revive the Ada support in gentoo. |
6 |
> > |
7 |
> > One ada compiler is produced by AdaCore and is provided in three |
8 |
> > versions, in the order starting from the best supported : |
9 |
> > |
10 |
> > 1) GnatPro, available with a contract support. |
11 |
> > |
12 |
> > 2) Gnat-GPL that can only build GPL-3 product |
13 |
> > |
14 |
> > 3) The gnat included in the gcc tree that is GPL-3 with exception. |
15 |
> > |
16 |
> > Gnat-GPL is very like the gnat in the gcc-tree so it can be built in |
17 |
> > the same way of sys-devel/gcc |
18 |
> > |
19 |
> > To be compiled from source the gcc compiler needs a C, C++, and Ada |
20 |
> > Compiler. I will provide one with the gnat-gpl-bin tar that could be |
21 |
> > installed under /opt . When the gcc is properly compiled we don't need |
22 |
> > it any more. |
23 |
> |
24 |
> Do I correctly understand that this is also true for gnat-gpl? Is there |
25 |
> any Ada compiler that could be used to bootstrap Ada on platforms that |
26 |
> lack prebuilt binaries? |
27 |
There is no difference between gcc and gnat-gpl. |
28 |
From what I see adacore take a snapshot of gcc and make its own changes to |
29 |
add ada supports. |
30 |
So gnat-gpl needs a gnat compiler to be built, like vanilla gcc does. |
31 |
|
32 |
From my research on internet adacore "guarantees" that the compiler can be |
33 |
built with itself or a version "-1" of it. Normally any version of a gnat |
34 |
compiler that is enough near can build it, but, without any big work, I don't |
35 |
expect that either gcc or gnat-gpl can be built with other non gcc/gnat Ada compilers. |
36 |
I have read of gcc ada compilers built on several platforms using cross |
37 |
compilation. Maybe those could be used, like suggested in |
38 |
https://bugs.gentoo.org/show_bug.cgi?id=592060 |
39 |
However I am for adding the boostrap via the binary provided by adacore |
40 |
only, via gnat-gpl-bin packages. At least for the beginning. |
41 |
|
42 |
> |
43 |
> > I would like to start including, in the gentoo tree, GNAT-GPL |
44 |
> > built in the same way as sys-devel-gcc and selectable with gcc-config |
45 |
> |
46 |
> 1. Does this mean that GNAT-GPL build will include building a C |
47 |
> compiler? If yes, will the C compiler be installed? |
48 |
Yes, a C and a C++ compiler, and they will be installed |
49 |
> |
50 |
> 2. Will it be possible to combine GNAT-GPL with a different version of |
51 |
> regular gcc C/C++ compilers? |
52 |
No, not easily |
53 |
> |
54 |
> > As for instance gnat-gpl-2014 is based on gcc-4.7.4 they cannot coexist |
55 |
> > and gnat-gpl-2014 will block sys-devel/gcc-4.7.4 |
56 |
> |
57 |
> Block the whole sys-devel/ or just sys-devel/gcc[ada]? |
58 |
Block the whole sys-devel/gcc-4.7.4 |
59 |
> |
60 |
> > As a reference I have my overlay on https://github.com/atupone/overlay |
61 |
> > and a pull request at https://github.com/gentoo/gentoo/pull/3186 |
62 |
> > |
63 |
> > To start I need to change the toolchain.eclass |
64 |
> > |
65 |
> > - tc_version_is_at_least 4.7 && IUSE+=" go" |
66 |
> > + tc_version_is_at_least 4.7 && IUSE+=" go ada" |
67 |
> > |
68 |
> > - # We do NOT want 'ADA support' in here! |
69 |
> > - # is_ada && GCC_LANG+=",ada" |
70 |
> > + # We do want 'ADA support' here! |
71 |
> > + is_ada && GCC_LANG+=",ada" |
72 |
> > |
73 |
> > - for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do |
74 |
> > + for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo gnatbind; do |
75 |
> > |
76 |
> > Thats all for that. |
77 |
> > |
78 |
> > Then, to not change the behaviour of the gcc-compiler, we could mask the |
79 |
> > ada use flag for sys-devel/gcc, at least temporarily |
80 |
> > |
81 |
> > --------------------- |
82 |
> > |
83 |
> > I would like to have comments on that, particularly because: |
84 |
> > a) it is going to add a use flag to sys-devel/gcc that will bring gcc |
85 |
> > to be rebuilt on most system, |
86 |
> |
87 |
> That's a minor problem. Toolchain people do this on us all the time, |
88 |
> so... |
89 |
> |
90 |
> > b) the gnat-gpl, if selected with gcc-config, can be used to recompile |
91 |
> > all the system, and maybe is not so good ? |
92 |
> |
93 |
> I don't really understand what you mean here. But it's probably related |
94 |
> to the questions I asked above. |
95 |
> |
96 |
> -- |
97 |
> Best regards, |
98 |
> Michał Górny |
99 |
> <http://dev.gentoo.org/~mgorny/> |