diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 8eadfbf898c..cb0ae64f9d3 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -206,15 +206,22 @@ stdenv.mkDerivation ({ ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkgconfig); + # 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 + ]; + buildInputs = [ gmp mpfr libmpc libelf + targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (cloog != null) cloog) ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # 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) diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 8a64cc79a9c..746beb01ecc 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -231,8 +231,6 @@ stdenv.mkDerivation ({ ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # 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) @@ -259,7 +257,8 @@ stdenv.mkDerivation ({ [ "--with-gmp-include=${gmp.dev}/include" "--with-gmp-lib=${gmp.out}/lib" - "--with-mpfr=${mpfr.dev}" + "--with-mpfr-include=${mpfr.dev}/include" + "--with-mpfr-lib=${mpfr.out}/lib" "--with-mpc=${libmpc}" ] ++ optional (libelf != null) "--with-libelf=${libelf}" ++ diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 5357f10ab5e..752e15c78cc 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -235,12 +235,10 @@ stdenv.mkDerivation ({ ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) # 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 hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 557c8ceba8a..5900775b097 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -237,12 +237,9 @@ stdenv.mkDerivation ({ ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # 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 hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 85350f5a2b2..c409b145299 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -207,12 +207,9 @@ stdenv.mkDerivation ({ targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # 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 hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 9dac0235037..34d8c1eb1c2 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -202,12 +202,9 @@ stdenv.mkDerivation ({ targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # 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 hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 96e05023743..d2f2c2ee558 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -172,12 +172,9 @@ stdenv.mkDerivation ({ targetPackages.stdenv.cc.bintools # For linking code at run-time ] ++ (optional (isl != null) isl) ++ (optional (zlib != null) zlib) - ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - # 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 hostPlatform.isDarwin targetPackages.stdenv.cc.bintools) ; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";