diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 7eab7ddb072c..fc332dff3aa3 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -56,12 +56,17 @@ rec { # Return a modified stdenv that adds a cross compiler to the # builds. - makeStdenvCross = stdenv: cross: binutils: gccCross: stdenv // { + makeStdenvCross = stdenvOrig: cross: cc: let + stdenv = stdenvOrig.override { + inherit cc; - # Overrides are surely not valid as packages built with this run on a - # different platform. - overrides = _: _: {}; + allowedRequisites = null; + # Overrides are surely not valid as packages built with this run on a + # different platform. + overrides = _: _: {}; + }; + in stdenv // { mkDerivation = { name ? "", buildInputs ? [], nativeBuildInputs ? [] , propagatedBuildInputs ? [], propagatedNativeBuildInputs ? [] @@ -91,7 +96,6 @@ rec { name = name + "-" + cross.config; nativeBuildInputs = nativeBuildInputs ++ nativeInputsFromBuildInputs - ++ [ gccCross binutils ] ++ stdenv.lib.optional selfNativeBuildInput nativeDrv # without proper `file` command, libtool sometimes fails # to recognize 64-bit DLLs @@ -109,10 +113,6 @@ rec { crossConfig = cross.config; } // args.crossAttrs or {}); - - inherit gccCross binutils; - ccCross = gccCross; - }; diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 7fe567251708..f9c23078cd30 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -31,15 +31,12 @@ in bootStages ++ [ targetPlatform = crossSystem; inherit config overlays; selfBuild = false; - stdenv = if crossSystem.useiOSCross or false - then let - inherit (buildPackages.darwin.ios-cross) cc binutils; - in buildPackages.makeStdenvCross - buildPackages.stdenv crossSystem - binutils cc - else buildPackages.makeStdenvCross - buildPackages.stdenv crossSystem - buildPackages.binutils buildPackages.gccCrossStageFinal; + stdenv = buildPackages.makeStdenvCross + buildPackages.stdenv + crossSystem + (if crossSystem.useiOSCross or false + then buildPackages.darwin.ios-cross + else buildPackages.gccCrossStageFinal); }) ] diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index 0378891b27ab..90c9d2cef67f 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -81,7 +81,6 @@ rec { nativeBuildInputs = [ pkgs.buildPackages.nukeReferences pkgs.buildPackages.cpio - pkgs.buildPackages.binutils ]; buildCommand = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11afb0d1e313..b499b623a8c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7805,7 +7805,6 @@ with pkgs; stdenv = buildPackages.makeStdenvCross buildPackages.buildPackages.stdenv buildPackages.targetPlatform - buildPackages.binutils buildPackages.gccCrossStageStatic; };