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:
@@ -77,7 +77,7 @@ in rec {
|
||||
|
||||
cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper {
|
||||
inherit shell;
|
||||
inherit (last) stdenv;
|
||||
inherit (last) stdenvNoCC;
|
||||
|
||||
nativeTools = false;
|
||||
nativeLibc = false;
|
||||
@@ -324,7 +324,7 @@ in rec {
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
|
||||
cc = lib.callPackageWith {} ../../build-support/cc-wrapper {
|
||||
inherit (pkgs) stdenv;
|
||||
inherit (pkgs) stdenvNoCC;
|
||||
inherit shell;
|
||||
nativeTools = false;
|
||||
nativeLibc = false;
|
||||
|
||||
@@ -77,7 +77,7 @@ let inherit (localSystem) system; in
|
||||
nativeTools = true;
|
||||
nativePrefix = "/usr";
|
||||
nativeLibc = true;
|
||||
inherit (prevStage) stdenv;
|
||||
stdenvNoCC = prevStage.stdenv;
|
||||
cc = {
|
||||
name = "clang-9.9.9";
|
||||
cc = "/usr";
|
||||
|
||||
@@ -84,7 +84,7 @@ let
|
||||
libc = prevStage.glibc;
|
||||
inherit (prevStage) binutils coreutils gnugrep;
|
||||
name = name;
|
||||
stdenv = prevStage.ccWrapperStdenv;
|
||||
stdenvNoCC = prevStage.ccWrapperStdenv;
|
||||
};
|
||||
|
||||
extraAttrs = {
|
||||
@@ -244,7 +244,7 @@ in
|
||||
};
|
||||
cc = prevStage.gcc-unwrapped;
|
||||
libc = self.glibc;
|
||||
inherit (self) stdenv binutils coreutils gnugrep;
|
||||
inherit (self) stdenvNoCC binutils coreutils gnugrep;
|
||||
name = "";
|
||||
shell = self.bash + "/bin/bash";
|
||||
};
|
||||
|
||||
@@ -117,6 +117,7 @@ in
|
||||
cc = null;
|
||||
fetchurl = null;
|
||||
};
|
||||
stdenvNoCC = stdenv;
|
||||
|
||||
cc = import ../../build-support/cc-wrapper {
|
||||
name = "cc-native";
|
||||
@@ -126,7 +127,7 @@ in
|
||||
"i686-solaris" = "/usr/gnu";
|
||||
"x86_64-solaris" = "/opt/local/gcc47";
|
||||
}.${system} or "/usr";
|
||||
inherit stdenv;
|
||||
inherit stdenvNoCC;
|
||||
};
|
||||
|
||||
fetchurl = import ../../build-support/fetchurl {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user