summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-06-06 18:30:36 +0000
committerGitHub <noreply@github.com>2021-06-06 18:30:36 +0000
commita1f68141f3458e836ced311c8b4408b364bb0dd7 (patch)
treed8e3881a3b71b2a79a50cd47cdde24722c1ae0bc /pkgs/development/libraries/glibc
parenta1d579cbd39601f22ccb8f831c4b7ede3b687f33 (diff)
parent0093d2d2d82933bcd174b5ca77ec3c42c55ff3da (diff)
downloadnixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.tar
nixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.tar.gz
nixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.tar.bz2
nixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.tar.lz
nixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.tar.xz
nixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.tar.zst
nixpkgs-a1f68141f3458e836ced311c8b4408b364bb0dd7.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r--pkgs/development/libraries/glibc/common.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index f0df6f9e592..6c4dfb50edb 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -228,6 +228,28 @@ stdenv.mkDerivation ({
     libc_cv_c_cleanup=yes
     libc_cv_gnu89_inline=yes
     EOF
+
+    # ./configure has logic like
+    #
+    #     AR=`$CC -print-prog-name=ar`
+    #
+    # This searches various directories in the gcc and its wrapper. In nixpkgs,
+    # this returns the bare string "ar", which is build ar. This can result as
+    # a build failure with the following message:
+    #
+    #     libc_pic.a: error adding symbols: archive has no index; run ranlib to add one
+    #
+    # (Observed cross compiling from aarch64-linux -> armv7l-linux).
+    #
+    # Nixpkgs passes a correct value for AR and friends, so to use the correct
+    # set of tools, we only need to delete this special handling.
+    sed -i \
+      -e '/^AR=/d' \
+      -e '/^AS=/d' \
+      -e '/^LD=/d' \
+      -e '/^OBJCOPY=/d' \
+      -e '/^OBJDUMP=/d' \
+      $configureScript
   '';
 
   preBuild = lib.optionalString withGd "unset NIX_DONT_SET_RPATH";