Gentoo Archives: gentoo-dev

From: Alfredo Tupone <tupone@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Changes in toolchain.eclass to enable Ada
Date: Wed, 21 Dec 2016 22:01:00
Message-Id: 20161221230047.73e62a2a@alfredo-i5
1 I would like to revive the Ada support in gentoo.
2
3 One ada compiler is produced by AdaCore and is provided in three
4 versions, in the order starting from the best supported :
5
6 1) GnatPro, available with a contract support.
7
8 2) Gnat-GPL that can only build GPL-3 product
9
10 3) The gnat included in the gcc tree that is GPL-3 with exception.
11
12 Gnat-GPL is very like the gnat in the gcc-tree so it can be built in
13 the same way of sys-devel/gcc
14
15 To be compiled from source the gcc compiler needs a C, C++, and Ada
16 Compiler. I will provide one with the gnat-gpl-bin tar that could be
17 installed under /opt . When the gcc is properly compiled we don't need
18 it any more.
19
20 I would like to start including, in the gentoo tree, GNAT-GPL
21 built in the same way as sys-devel-gcc and selectable with gcc-config
22
23 As for instance gnat-gpl-2014 is based on gcc-4.7.4 they cannot coexist
24 and gnat-gpl-2014 will block sys-devel/gcc-4.7.4
25
26 As a reference I have my overlay on https://github.com/atupone/overlay
27 and a pull request at https://github.com/gentoo/gentoo/pull/3186
28
29 To start I need to change the toolchain.eclass
30
31 - tc_version_is_at_least 4.7 && IUSE+=" go"
32 + tc_version_is_at_least 4.7 && IUSE+=" go ada"
33
34 - # We do NOT want 'ADA support' in here!
35 - # is_ada && GCC_LANG+=",ada"
36 + # We do want 'ADA support' here!
37 + is_ada && GCC_LANG+=",ada"
38
39 - for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
40 + for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo gnatbind; do
41
42 Thats all for that.
43
44 Then, to not change the behaviour of the gcc-compiler, we could mask the
45 ada use flag for sys-devel/gcc, at least temporarily
46
47 ---------------------
48
49 I would like to have comments on that, particularly because:
50 a) it is going to add a use flag to sys-devel/gcc that will bring gcc
51 to be rebuilt on most system,
52 b) the gnat-gpl, if selected with gcc-config, can be used to recompile
53 all the system, and maybe is not so good ?
54
55 Alfredo

Replies

Subject Author
Re: [gentoo-dev] Changes in toolchain.eclass to enable Ada "Michał Górny" <mgorny@g.o>