From bfbdd69b2fba243ccf4d83e167363563e9786497 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 May 2007 13:33:23 +0000 Subject: [PATCH] * Make a symlink "lib64" to "lib" to fix ldd (which looks for the dynamic linker in lib64 on x86_64). (NIXOS-54) svn path=/nixpkgs/trunk/; revision=8741 --- pkgs/development/libraries/glibc/builder.sh | 6 ++++++ pkgs/development/libraries/glibc/default.nix | 2 ++ 2 files changed, 8 insertions(+) diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh index f8726fd31d23..8d5d6908f045 100644 --- a/pkgs/development/libraries/glibc/builder.sh +++ b/pkgs/development/libraries/glibc/builder.sh @@ -56,6 +56,12 @@ postInstall() { # appears to be a regression: # http://www.mail-archive.com/debian-glibc@lists.debian.org/msg31543.html cp ../$sourceRoot/linuxthreads/semaphore.h $out/include + + # Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink + # "lib64" to "lib". + if test -n "$is64bit"; then + ln -s lib $out/lib64 + fi } diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 086747e9dcc6..e4720cf56d52 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation { inherit kernelHeaders installLocales; + inherit (stdenv) is64bit; + # `--with-tls --without-__thread' enables support for TLS but causes # it not to be used. Required if we don't want to barf on 2.4 # kernels. Or something.