From fd5d487ef4490d5ac9cdeed8130748ccc3b2bc2b Mon Sep 17 00:00:00 2001 From: misuzu Date: Wed, 23 Jun 2021 11:29:41 +0300 Subject: [PATCH] binutils: apply R_ARM_COPY.patch only when cross-compiling to armv7l Applying R_ARM_COPY.patch when not cross-compiling breaks native armv7l builds. (cherry picked from commit 5aad70e8beb98a1c855facea5c9749f644e8b897) --- pkgs/development/tools/misc/binutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 8042655a859..a4233886a85 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation { # indeed GHC will refuse to compile with a binutils suffering from it. See # this comment for more information: # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 - lib.optional stdenv.targetPlatform.isAarch32 ./R_ARM_COPY.patch; + lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch; outputs = [ "out" "info" "man" ];