gnat*: bootstrap cross with native compiler of the same version

https://gcc.gnu.org/install/prerequisites.html#GNAT-prerequisite
This commit is contained in:
sternenseemann 2021-07-22 18:57:58 +02:00 committed by Profpatsch
parent 801152e057
commit 364713fdd3

View file

@ -11212,7 +11212,15 @@ in
langCC = false;
langAda = true;
profiledCompiler = false;
inherit (buildPackages) gnatboot;
# As per upstream instructions building a cross compiler
# should be done with a (native) compiler of the same version.
# If we are cross-compiling GNAT, we may as well go the same
# route (especially as gnatboot can't cross-compile).
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnatboot
else buildPackages.gnat6;
});
gnat9 = wrapCC (gcc9.cc.override {
@ -11221,7 +11229,14 @@ in
langCC = false;
langAda = true;
profiledCompiler = false;
gnatboot = buildPackages.gnat6;
# As per upstream instructions building a cross compiler
# should be done with a (native) compiler of the same version.
# If we are cross-compiling GNAT, we may as well do the same.
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
else buildPackages.gnat9;
});
gnat10 = wrapCC (gcc10.cc.override {
@ -11230,7 +11245,14 @@ in
langCC = false;
langAda = true;
profiledCompiler = false;
gnatboot = buildPackages.gnat6;
# As per upstream instructions building a cross compiler
# should be done with a (native) compiler of the same version.
# If we are cross-compiling GNAT, we may as well do the same.
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
else buildPackages.gnat10;
});
gnat11 = wrapCC (gcc11.cc.override {
@ -11239,7 +11261,14 @@ in
langCC = false;
langAda = true;
profiledCompiler = false;
gnatboot = buildPackages.gnat6;
# As per upstream instructions building a cross compiler
# should be done with a (native) compiler of the same version.
# If we are cross-compiling GNAT, we may as well do the same.
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
else buildPackages.gnat11;
});
gnatboot = wrapCC (callPackage ../development/compilers/gnatboot { });