diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index e40ded4042d9..443f1b2c4570 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -31,9 +31,11 @@ stdenv.mkDerivation (finalAttrs: { # Linux it uses objdump. We don't have dwarfdump packaged for # Darwin, so this patch updates the test to also use objdump on # Darwin. + # Additionally, when cross compiling, the correct target prefix + # needs to be set. (substituteAll { - src = ./force-objdump-on-darwin.patch; - objdump = "${binutils.bintools}/bin/objdump"; + src = ./fix-objdump-path.patch; + objdump = "${binutils.bintools}/bin/${binutils.targetPrefix}objdump"; }) ]; diff --git a/pkgs/development/tools/misc/ccache/force-objdump-on-darwin.patch b/pkgs/development/tools/misc/ccache/fix-objdump-path.patch similarity index 100% rename from pkgs/development/tools/misc/ccache/force-objdump-on-darwin.patch rename to pkgs/development/tools/misc/ccache/fix-objdump-path.patch