Project:Ada

From Gentoo Wiki
Jump to:navigation Jump to:search
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.

We also hope to integrate gnat-gcc with the standard toolchain packages starting with 6.x/7.x, with new arches added as new bootstraps become available (see the ada-overlay on github for the current packages/eclass).

Current packages

At present

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:

  1. Enable the ada use flag for sys-devel/gcc via package.use
  2. emerge --oneshot --changed-use sys-devel/gcc
  3. 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:

FILE /etc/portage/make.confADA setting
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:

FILE /etc/portage/package.maskADA setting
>=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:

FILE /etc/portage/make.confADA setting
ADA_TARGET="gnat_2021"

i.e. enabling gnat_2021 and then rebuild all ada packages

See also