From 839f96a4c5c4e5565239adbdf8a40667056a2652 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 24 Jul 2018 16:39:13 -0400 Subject: [PATCH] crossLibcStdenv: Just use `overrideCC` Now that we don't hackily override `mkDerivation`, the TODO is solved and we just can! --- pkgs/top-level/all-packages.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da44294f6379..f078a901c8bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6334,13 +6334,7 @@ with pkgs; { substitutions = { gcc = gcc-unwrapped; }; } ../development/compilers/gcc/libstdc++-hook.sh; - # Can't just overrideCC, because then the stdenv-cross mkDerivation will be - # thrown away. TODO: find a better solution for this. - crossLibcStdenv = buildPackages.makeStdenvCross { - inherit (buildPackages.buildPackages) stdenv; - inherit buildPlatform hostPlatform targetPlatform; - cc = buildPackages.gccCrossStageStatic; - }; + crossLibcStdenv = overrideCC stdenv buildPackages.gccCrossStageStatic; # The GCC used to build libc for the target platform. Normal gccs will be # built with, and use, that cross-compiled libc.