summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/6
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@yahoo.com>2017-11-08 14:20:48 -0500
committerGitHub <noreply@github.com>2017-11-08 14:20:48 -0500
commit01018567653aaa58bedf6f7ca6a02c6d50910075 (patch)
tree89dcb477933b3f439ef9f43e22e01a2ed360cfb7 /pkgs/development/compilers/gcc/6
parent999bcd098da0fc6b16ae769dde95573e6b110844 (diff)
parent4d4f94cde4d3806ca063ebf7e6ba448b0feae355 (diff)
downloadnixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.tar
nixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.tar.gz
nixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.tar.bz2
nixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.tar.lz
nixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.tar.xz
nixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.tar.zst
nixlib-01018567653aaa58bedf6f7ca6a02c6d50910075.zip
Merge pull request #30549 from obsidiansystems/bintools
treewide: Introduce stdenv.cc.bintools
Diffstat (limited to 'pkgs/development/compilers/gcc/6')
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 7d019c7fe848..3ae478c4ecf6 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, noSysDirs
+{ stdenv, targetPackages, fetchurl, noSysDirs
 , langC ? true, langCC ? true, langFortran ? false
 , langObjC ? targetPlatform.isDarwin
 , langObjCpp ? targetPlatform.isDarwin
@@ -31,7 +31,6 @@
 , libpthread ? null, libpthreadCross ? null  # required for GNU/Hurd
 , stripped ? true
 , gnused ? null
-, binutils ? null
 , cloog # unused; just for compat with gcc4, as we override the parameter on some places
 , darwin ? null
 , buildPlatform, hostPlatform, targetPlatform
@@ -50,7 +49,7 @@ assert libelf != null -> zlib != null;
 assert hostPlatform.isDarwin -> gnused != null;
 
 # Need c++filt on darwin
-assert hostPlatform.isDarwin -> binutils != null;
+assert hostPlatform.isDarwin -> targetPackages.stdenv.cc.bintools or null != null;
 
 # The go frontend is written in c++
 assert langGo -> langCC;
@@ -145,8 +144,8 @@ let version = "6.4.0";
         withFloat +
         withMode +
         # Ensure that -print-prog-name is able to find the correct programs.
-        " --with-as=${binutils}/bin/${targetPlatform.config}-as" +
-        " --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
+        " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" +
+        " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" +
         (if crossMingw && crossStageStatic then
           " --with-headers=${libcCross}/include" +
           " --with-gcc" +
@@ -309,14 +308,14 @@ stdenv.mkDerivation ({
     ++ (optional (zlib != null) zlib)
     ++ (optionals langJava [ boehmgc zip unzip ])
     ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
-    ++ (optionals (targetPlatform != hostPlatform) [binutils])
+    ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
     ++ (optionals langAda [gnatboot])
     ++ (optionals langVhdl [gnat])
 
     # 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 binutils)
+    ++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
     ;
 
   NIX_LDFLAGS = stdenv.lib.optionalString  hostPlatform.isSunOS "-lm -ldl";