GCC's installation instructions strongly recommend using an older
version of GNAT to build GNAT, as "[m]ore recent versions of GNAT than
the version built are not guaranteed to work and will often fail during
the build with compilation errors." [1]
The recent upgrade of gnatboot to a 12.1 release in commit bc640dc
unfortunately resulted in such a failure for gnat11 [2], resulting in
the same errors as GCC bug 103357 [3], which was marked WONTFIX for the
reason above.
This patch therefore reverts gnat11 to being built with an earlier 11.x
gnatboot version, while keeping the updated 12.1 gnatboot to build
gnat12 (which is fine because the latter is currently version 12.2).
Fixing gnat11 is also a step towards re-enabling the
coreboot-toolchain-* packages to be built with Ada support.
To facilitate such explicit version dependencies while retaining the
meaning of the existing gnatboot package, and in the fashion of the
existing gcc packages, this patch also creates the packages gnatboot11
and gnatboot12 with gnatboot made an alias of gnatboot12.
[1]: https://gcc.gnu.org/install/prerequisites.html
[2]: https://github.com/NixOS/nixpkgs/pull/182414#issuecomment-1204432909
[3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103357
* gnatboot can't be used as cross compiler, so we should prevent this at
eval time.
* Explicitly checking hostPlatform is also a lot nicer. Keeping system
since gnatboot seems to be statically linked so gnu/musl which is also
tracked in config isn't important.
Some things don't work:
- The ghdl expression (it still needs the gcc 4.3.4 src, ...)
- The gnat wrappers need to be more generic - now they work only for the
given gnatboot (taken from gentoo) and gnats installed to their $out
store path.
- Using the cloogppl and ppl. We will need our own gnatboot built with c++
libraries for that.
svn path=/nixpkgs/branches/stdenv-updates/; revision=19060