diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-02-09 12:01:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 12:01:30 +0000 |
commit | c76e040c19b29c37473fda47c1cb3540d705674b (patch) | |
tree | 36b9de4e1296304b9b19c0a178260bc1f7fed41f /pkgs/development/compilers/gcc/10/default.nix | |
parent | 73fe6149d4cdd6a07b366c7d36d7daf9f9d6df3e (diff) | |
parent | 724bfc0892363087709bd3a5a1666296759154b1 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers/gcc/10/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/10/default.nix | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 42939d5cf47fe..3224696a5e33c 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -158,34 +158,32 @@ stdenv.mkDerivation ({ inherit noSysDirs staticCompiler crossStageStatic libcCross crossMingw; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl) - ++ (optional langAda gnatboot) - # 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 buildPlatform.isDarwin gnused) - ; - - # For building runtime libs - depsBuildTarget = - ( - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ] - ) - ++ optional targetPlatform.isLinux patchelf; - - buildInputs = [ - gmp mpfr libmpc libxcrypt - targetPackages.stdenv.cc.bintools # For linking code at run-time - ] ++ (optional (isl != null) isl) - ++ (optional (zlib != null) zlib) + inherit (import ../common/dependencies.nix { + inherit + lib + stdenv + buildPackages + targetPackages + crossStageStatic + threadsCross + langAda + libxcrypt + gnatboot + version + texinfo + which + gettext + gnused + patchelf + gmp + mpfr + libmpc + isl + zlib + zip + perl ; - - depsTargetTarget = optional (!crossStageStatic && threadsCross != {} && threadsCross.package != null) threadsCross.package; + }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm"; |