diff --git a/pkgs/development/libraries/glibc-2.9/builder.sh b/pkgs/development/libraries/glibc-2.9/builder.sh index 34219f12f42..8cc6be4cf73 100644 --- a/pkgs/development/libraries/glibc-2.9/builder.sh +++ b/pkgs/development/libraries/glibc-2.9/builder.sh @@ -1,6 +1,5 @@ -# glibc cannot have itself in its rpath. +# Glibc cannot have itself in its RPATH. export NIX_NO_SELF_RPATH=1 -export NIX_DONT_SET_RPATH=1 source $stdenv/setup @@ -41,6 +40,8 @@ postConfigure() { # test binaries. export NIX_CFLAGS_LINK= export NIX_LDFLAGS_BEFORE= + + export NIX_DONT_SET_RPATH=1 } diff --git a/pkgs/stdenv/linux/bootstrap/i686/bzip2 b/pkgs/stdenv/linux/bootstrap/i686/bzip2 index c4a9e6cb872..6cd5273c333 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/bzip2 and b/pkgs/stdenv/linux/bootstrap/i686/bzip2 differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/cpio b/pkgs/stdenv/linux/bootstrap/i686/cpio index 03f053ce65e..387b67664f6 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/cpio and b/pkgs/stdenv/linux/bootstrap/i686/cpio differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 b/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 index 394b0fb2b46..a6dd7502b5a 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 and b/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/default.nix b/pkgs/stdenv/linux/bootstrap/i686/default.nix index 4200bcb7ea6..f83fa44360d 100644 --- a/pkgs/stdenv/linux/bootstrap/i686/default.nix +++ b/pkgs/stdenv/linux/bootstrap/i686/default.nix @@ -7,7 +7,7 @@ curl = ./curl.bz2; bootstrapTools = { - url = http://nixos.org/tarballs/stdenv-linux/i686/r13932/bootstrap-tools.cpio.bz2; - sha256 = "12z35wnpcbjwczsr9fldp6bjpz7wh5qwylw6xfrr9l4s7gmk3m8a"; + url = http://nixos.org/tarballs/stdenv-linux/i686/r16022/bootstrap-tools.cpio.bz2; + sha256 = "1x014icv3dxfs55qzshxjs9gaczmhwlrn144p4314zvl4xz6wq3f"; }; } diff --git a/pkgs/stdenv/linux/bootstrap/i686/ln b/pkgs/stdenv/linux/bootstrap/i686/ln index dda29b4ea2b..57ddcf8dcf7 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/ln and b/pkgs/stdenv/linux/bootstrap/i686/ln differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/mkdir b/pkgs/stdenv/linux/bootstrap/i686/mkdir index b3682da3cd2..18c35db0aff 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/mkdir and b/pkgs/stdenv/linux/bootstrap/i686/mkdir differ diff --git a/pkgs/stdenv/linux/bootstrap/i686/sh b/pkgs/stdenv/linux/bootstrap/i686/sh index b03bbf0cfcd..13e681ed1a9 100755 Binary files a/pkgs/stdenv/linux/bootstrap/i686/sh and b/pkgs/stdenv/linux/bootstrap/i686/sh differ diff --git a/pkgs/stdenv/linux/bootstrap/x86_64/default.nix b/pkgs/stdenv/linux/bootstrap/x86_64/default.nix index 30b30d9c498..ffd23a86603 100644 --- a/pkgs/stdenv/linux/bootstrap/x86_64/default.nix +++ b/pkgs/stdenv/linux/bootstrap/x86_64/default.nix @@ -4,7 +4,7 @@ { bootstrapTools = { - url = http://nixos.org/tarballs/stdenv-linux/x86_64/r13932/bootstrap-tools.cpio.bz2; - sha256 = "135lx2945cxf43g9n39dxcamw6f6n8qp5iqbh4xma575rf2bx5js"; + url = http://nixos.org/tarballs/stdenv-linux/x86_64/r16022/bootstrap-tools.cpio.bz2; + sha256 = "1hwmyd9x9lhmb1ckwap2lvf7wi34p1j23v5bw41drym4mfp97ynz"; }; -} \ No newline at end of file +} diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index f269c4799b3..b74258120b3 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -77,8 +77,6 @@ rec { param1 = bootstrapTools; preHook = builtins.toFile "prehook.sh" '' - # Put libpthread.so in LD_LIBRARY_PATH; some libraries need it. - export LD_LIBRARY_PATH=$param1/lib2 # Don't patch #!/interpreter because it leads to retained # dependencies on the bootstrapTools in the final stdenv. dontPatchShebangs=1 diff --git a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh b/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh index 2e7b660c56f..c1fa8582ed8 100644 --- a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh @@ -16,7 +16,7 @@ for i in $out/bin/* $out/libexec/gcc/*/*/*; do echo patching $i if ! test -L $i; then LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 \ - ./patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib $i + ./patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib --force-rpath $i fi done @@ -33,16 +33,3 @@ ln -s bzip2 $out/bin/bunzip2 # fetchurl needs curl. bzip2 -d < $curl > $out/bin/curl chmod +x $out/bin/curl - -# Some libraries have libpthread in their DT_RUNPATH. PatchELF -# doesn't work on libraries, so we need to set LD_LIBRARY_PATH. -# However, setting LD_LIBRARY_PATH to $out/lib will confuse /bin/sh, -# since it might end up loading libraries from a different Glibc. So -# put *only* libpthread in LD_LIBRARY_PATH (via $out/lib2). !!! This -# is a temporary fix (since /bin/sh could have a dependency on -# libpthread as well). A better fix would be to make patchelf work on -# libraries, or to set the RPATH rather than the RUNPATH in the -# binaries in $out/bin (patchelf --force-rpath doesn't quite work, -# since it doesn't discard the existing RUNPATH). -mkdir $out/lib2 -ln -s $out/lib/libpthread* $out/lib2