From be560224beabe7da5fa543cf8f59592015a36ccb Mon Sep 17 00:00:00 2001 From: Asad Mehmood Date: Thu, 2 Jun 2022 23:32:30 +0100 Subject: [PATCH] binutils: Reduce closure size when building for cross platform --- pkgs/development/tools/misc/binutils/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 279e0da7155f..4457db094301 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -194,6 +194,9 @@ stdenv.mkDerivation { # mass rebuild. postFixup = ""; + # Break dependency on pkgsBuildBuild.gcc when building a cross-binutils + stripDebugList = if stdenv.hostPlatform != stdenv.targetPlatform then "bin lib ${stdenv.hostPlatform.config}" else null; + # INFO: Otherwise it fails with: # `./sanity.sh: line 36: $out/bin/size: not found` doInstallCheck = (buildPlatform == hostPlatform) && (hostPlatform == targetPlatform);