Project:Ada
Ada Project | |
---|---|
Description | This project provides support for Ada compilers and libraries in Portage. At present both a gnat compiler (gnat-gpl by AdaCore) and gcc (by FSF) are provided. |
Project email | ada@gentoo.org |
Packages | p.g.o/ada@gentoo.org
|
Lead(s) |
Last elected: 2019-04-17 |
Member(s) | |
Subproject(s) (and inherited member(s)) |
(none) |
Parent Project | Gentoo |
Project listing |
Aim of the project
The project maintains the compiler, builder, system library and IDE for Ada.
The SPARK language, based on Ada and aimed at safety and security, is also supported.
The reference sources are present at https://www.adacore.com/download/more, maintained by AdaCore.
Current packages
At present
- dev-lang/gnat-gpl
- dev-lang/spark
- dev-ada/aunit
- dev-ada/aws
- dev-ada/libadalang
- dev-ada/libadalang-tools
- dev-ada/gnatcoll-core
- dev-ada/gnatcoll-bindings
- dev-ada/gnatmem
- dev-ada/gnatsymbolize
- dev-ada/gtkada
- dev-ada/libgpr
- dev-ada/xmlada
- dev-ada/langkit
packages are part of the project.
Compilers
The only free software compiler for Ada is GNAT which is part of GCC. GNAT is written in Ada and hence needs an Ada compiler to be built.
sys-devel/gcc
It is possible to add Ada support to sys-devel/gcc. After recent changes for bug #547358, the process is greatly simplified!
These are the steps you need to follow:
- Enable the ada use flag for sys-devel/gcc via package.use
- emerge --oneshot --changed-use sys-devel/gcc
- Select the newly built gcc compiler (gcc-config)
You should have now the Ada compiler ready to use.
Building the dev-ada packages
When building Ada-related packages, you need to indicate which version of compilers to use by setting the ADA_TARGET variable in the file /etc/portage/make.conf:
ADA_TARGET="gnat_2021"
The value used are
- gnat_2021 to select dev-lang/gnat-gpl-2021
- gcc_12 to select sys-devel/gcc-12
- gcc_13 to select sys-devel/gcc-13
Switching to github release
Slowly we are switching to GitHub releases.
e.g. last release of dev-ada/gprbuild is from GitHub and is versioned 22.0.0.
To use these release you should mask the GitHub switched package for all the annual-based versions:
>=dev-ada/gprbuild-2000
Compiler changes
When you want to use a new Ada compiler, you need to change the make.conf to reflect this choice:
ADA_TARGET="gnat_2021"
i.e. enabling gnat_2021 and then rebuild all ada packages