about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-12-24 13:06:04 +0100
committerLluís Batlle i Rossell <viric@viric.name>2012-12-24 13:06:04 +0100
commit636722eb93699d17c032c8734a2e1eda6453a4ff (patch)
tree584fed69af3cfc59014ef2a69b0d44c5b3681e88
parent0584c1c6930cecbbb941ab084a73bfb964edeed6 (diff)
Less intrussive fix for glibc 2.16 cross-rpcgen build
Using LD_LIBRARY_PATH, sets overrides of libs for all binaries run.

On mips64, the libz in the bootstrap-tools is a bit incompatible with
the libz binutils are built with (ld.so outputs a warning at every program run
that uses libz). binutils need to be dynamically linked to the libz they
have been linked to.

Glibc creates 'shlib.lds' using the gas program output, and it includes the
ld.so warning in case of using LD_LIBRARY_PATH. That breaks the glibc build.

As Makefile includes BUILD_LDFLAGS for the purpose of cross-rpcgen, I
use this instead of the intrusive LD_LIBRARY_PATH.
-rw-r--r--pkgs/development/libraries/glibc/2.16/common.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/development/libraries/glibc/2.16/common.nix b/pkgs/development/libraries/glibc/2.16/common.nix
index 84bbefee840e9..ea54b45a50dee 100644
--- a/pkgs/development/libraries/glibc/2.16/common.nix
+++ b/pkgs/development/libraries/glibc/2.16/common.nix
@@ -170,8 +170,7 @@ stdenv.mkDerivation ({
 
     configureScript="`pwd`/../$sourceRoot/configure"
 
-    # Needed to build rpcgen.
-    export LD_LIBRARY_PATH=${stdenv.gcc.libc}/lib
+    makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.gcc.libc}/lib"
 
     ${preConfigure}
   '';