cc-wrapper: Use stdenvNoCC to build

cc-wrapper may wrap a cc-compiler, but it doesn't need one to build
itself. (c.f. expand-response-params is a separate derivation.) This
helps avoid cycles on the cross stuff, in addition to removing a
useless dependency edge.

I could have been super careful with overrides in the stdenv to avoid
the mass rebuild, but I don't think it's worth it.
This commit is contained in:
John Ericson
2017-09-26 14:08:21 -04:00
parent 0d3d2a01d2
commit d349f9a340
7 changed files with 18 additions and 19 deletions
+5 -8
View File
@@ -1,5 +1,5 @@
{ lib
, crossSystem, config
, crossSystem, config, overlays
, bootStages
, ...
}:
@@ -7,9 +7,7 @@
assert crossSystem == null;
bootStages ++ [
(prevStage: let
inherit (prevStage) stdenv;
in {
(prevStage: {
inherit config overlays;
stdenv = import ../generic rec {
@@ -27,10 +25,9 @@ bootStages ++ [
cc = import ../../build-support/cc-wrapper {
nativeTools = false;
nativePrefix = stdenv.lib.optionalString hostPlatform.isSunOS "/usr";
nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr";
nativeLibc = true;
inherit stdenv;
inherit (prevStage) binutils coreutils gnugrep;
inherit (prevStage) stdenvNoCC binutils coreutils gnugrep;
cc = prevStage.gcc.cc;
isGNU = true;
shell = prevStage.bash + "/bin/sh";
@@ -38,7 +35,7 @@ bootStages ++ [
shell = prevStage.bash + "/bin/sh";
fetchurlBoot = stdenv.fetchurlBoot;
fetchurlBoot = prevStage.stdenv.fetchurlBoot;
overrides = self: super: {
inherit cc;