summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/7/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/gcc/7/default.nix')
-rw-r--r--pkgs/development/compilers/gcc/7/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix
index c8d54308c955..d70214e41143 100644
--- a/pkgs/development/compilers/gcc/7/default.nix
+++ b/pkgs/development/compilers/gcc/7/default.nix
@@ -36,6 +36,7 @@
 , darwin ? null
 , flex ? null
 , buildPlatform, hostPlatform, targetPlatform
+, buildPackages
 }:
 
 assert langJava     -> zip != null && unzip != null
@@ -343,7 +344,7 @@ stdenv.mkDerivation ({
       )
     }
     ${optionalString (!(crossMingw && crossStageStatic))
-      "--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
+      "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
     ${if langAda then " --enable-libada" else ""}
     ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
     ${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
@@ -408,8 +409,7 @@ stdenv.mkDerivation ({
     buildFlags = "";
   };
 
-  NIX_BUILD_CC = stdenv.cc;
-  NIX_CC_CROSS = stdenv.ccCross or null;
+  NIX_BUILD_CC = buildPackages.stdenv.cc;
 
   # Needed for the cross compilation to work
   AR = "ar";