From 636722eb93699d17c032c8734a2e1eda6453a4ff Mon Sep 17 00:00:00 2001 From: LluĂ­s Batlle i Rossell Date: Mon, 24 Dec 2012 13:06:04 +0100 Subject: 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. --- pkgs/development/libraries/glibc/2.16/common.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/libraries/glibc/2.16/common.nix b/pkgs/development/libraries/glibc/2.16/common.nix index 84bbefee840e..ea54b45a50de 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} ''; -- cgit 1.4.1