Project:Ada

Aim of the project
The project maintain the compiler, builder, system library and IDE for ada. The reference sources are the one present in the libre.adacore.com site, maintained by AdaCore.

Current packages
At present packages are part of the project.
 * dev-lang/gnat-gpl
 * dev-ada/asis
 * dev-ada/gprbuild
 * dev-ada/gnatcoll
 * dev-ada/gnatmem
 * dev-ada/gnat_util
 * dev-ada/gtkada
 * dev-ada/xmlada
 * dev-ada/gps-bin
 * dev-ada/aws

gnat-gpl share in fact most of the sources and the binaries with gcc.
 * dev-lang/gnat-gpl-2016 conflict with the sys-devel/gcc-4.9.4 compiler.
 * dev-lang/gnat-gpl-2017 conflict with the sys-devel/gcc-6.30 compiler.

Configuration
You need to indicate the Those should be set in the file etc/portage/make.conf
 * the ADA compiler used to build Ada Ada packages
 * the ADA compiler FLAGS, again to build Ada packages
 * optionally the nostrip features (or splitdebug) to retains symbol in the gnat runtime (e.g. catch exception with debugger)

The ADA variable is the basename of the gcc compiler that can compile ada files. If you do not specify the ADA variable, the system gcc compiler will be used instead, if capable.

Build instructions
To build the compiler unfortunately you need an ada/c/c++ compiler already available, to produce an ada/c/c++ compiler.

If you don't have an ada compiler available you must set the bootstrap use flags. In this case the compiler used will be gnat-gpl-2014-x86_64-linux-bin.tar.gz from libre.adacore.com.

Once installed you can use the compiler either
 * by selecting it with gcc-config. In this case you also change the default c/c++ compiler (and this is not supported to upgrade gentoo)
 * by postfixing any ada command with its own version: eg. gnatmake-4.9.4

Similar to the compiler, for gprbuild you need to set the "bootstrap" flag and unset the "shared" flag initially for the first build, then rebuild them in order to be able to use them as shared libs, like this:

as dev-ada/gprbuild needs dev-ada/xmlada and dev-ada/xmlada needs dev-ada/gprbuild; the bootstrap flag breaks the loop.

Compiler upgrade
When you want to use a new ada compiler you need to change the make.conf to reflect this choice and then rebuild all ada packages re-bootstrap-ing again dev-ada/gprbuild