From 0924152075062943f623ba9e9f8ded26bbe1cd2c Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Mon, 23 Nov 2020 19:04:14 -0800 Subject: [PATCH] glibc: fix cross-compile to ppc64le Fixes cross-compilation when build == host != target == ppc64le. Glibc invokes objcopy during cross-compilation to ppc64le, which fails when the nonprefixed objcopy can't understand the target format. --- pkgs/development/libraries/glibc/common.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 3de840d4e3c..630b6b82446 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -160,6 +160,10 @@ stdenv.mkDerivation ({ "libc_cv_as_needed=no" ] ++ lib.optional withGd "--with-gd"; + makeFlags = [ + "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" + ]; + installFlags = [ "sysconfdir=$(out)/etc" ]; outputs = [ "out" "bin" "dev" "static" ];