treewide: Do a number of no-op cleanups for cross and darwin

I am taking the non-invasive parts of #110914 to hopefully help out with #111988.

In particular:

 - Use `lib.makeScopeWithSplicing` to make the `darwin` package set have
   a proper `callPackage`.

 - Adjust Darwin `stdenv`'s overlays keeping things from the previous
   stage to not stick around too much.

 - Expose `binutilsNoLibc` / `darwin.binutilsNoLibc` to hopefully get us
   closer to a unified LLVM and GCC bootstrap.
This commit is contained in:
John Ericson
2021-05-06 11:17:26 -04:00
parent b418e17a4c
commit 470640e7fe
7 changed files with 111 additions and 83 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ self: super: let
}; in stdenv // {
mkDerivation = args: stdenv.mkDerivation (args // {
NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "")
+ optionalString stdenv.cc.isGNU " -static-libgcc";
+ optionalString (stdenv_.cc.isGNU or false) " -static-libgcc";
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ (makeSetupHook {
substitutions = {
libsystem = "${stdenv.cc.libc}/lib/libSystem.B.dylib";