diff options
Diffstat (limited to 'pkgs/development/compilers/gcc/9')
-rw-r--r-- | pkgs/development/compilers/gcc/9/default.nix | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 6222623f0a2..53945fec461 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -158,34 +158,31 @@ 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 - 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 + gnatboot + version + texinfo + which + gettext + gnused + patchelf + gmp + mpfr + libmpc + isl + zlib + zip + perl ; - - depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package; + }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm"; |