diff options
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/10/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/11/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/9/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/common/configure-flags.nix | 7 | ||||
-rw-r--r-- | pkgs/development/compilers/gnatboot/default.nix | 8 |
6 files changed, 23 insertions, 12 deletions
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 143681c2a5b..58a4dfbe36e 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -156,7 +156,9 @@ stdenv.mkDerivation ({ depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl); + ++ (optional (perl != null) perl) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -177,7 +179,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 7efc9d589f9..15d93561871 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -161,7 +161,9 @@ stdenv.mkDerivation ({ depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl); + ++ (optional (perl != null) perl) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -182,7 +184,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 4567e8b43e9..df4a632db05 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -199,7 +199,9 @@ stdenv.mkDerivation ({ nativeBuildInputs = [ texinfo which gettext ] ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkg-config) - ++ (optional (with stdenv.targetPlatform; isVc4 || isRedox) flex); + ++ (optional (with stdenv.targetPlatform; isVc4 || isRedox) flex) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -222,7 +224,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 857263e51e0..43b2e0b5ef5 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -170,7 +170,9 @@ stdenv.mkDerivation ({ depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl); + ++ (optional (perl != null) perl) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -191,7 +193,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 997771c2abf..1d75966797b 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -170,8 +170,11 @@ let "--enable-cloog-backend=isl" ] - # Ada options - ++ lib.optional langAda "--enable-libada" + # Ada options, gcc can't build the runtime library for a cross compiler + ++ lib.optional langAda + (if hostPlatform == targetPlatform + then "--enable-libada" + else "--disable-libada") # Java options ++ lib.optionals langJava [ diff --git a/pkgs/development/compilers/gnatboot/default.nix b/pkgs/development/compilers/gnatboot/default.nix index d97298d0238..c68c4fd4ba0 100644 --- a/pkgs/development/compilers/gnatboot/default.nix +++ b/pkgs/development/compilers/gnatboot/default.nix @@ -1,15 +1,19 @@ { lib, stdenv, fetchurl }: +if stdenv.hostPlatform != stdenv.targetPlatform +then builtins.throw "gnatboot can't cross-compile" +else + stdenv.mkDerivation { pname = "gentoo-gnatboot"; version = "4.1"; - src = if stdenv.system == "i686-linux" then + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2; sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2; sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4"; |