diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 9c3c34c73aad1..78d1cc5b98d34 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -121,9 +121,6 @@ let EOF '' + optionalString stdenv.isDarwin '' substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" "" - '' + optionalString (!enableThreading) '' - # We need to do this because the bootstrap doesn't have a static libpthread - sed -i 's,\(libswanted.*\)pthread,\1,g' Configure ''; # Default perl does not support --host= & co. diff --git a/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh b/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh index f394869ea915b..b79c22478eed7 100644 --- a/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh @@ -29,7 +29,7 @@ for i in $out/bin/* $out/libexec/gcc/*/*/*; do ./patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath "$i" done -for i in $out/lib/librt-*.so $out/lib/libpcre*; do +for i in $out/lib/librt-*.so $out/lib/libpcre* $out/lib/libpthread-*.so; do if [ -L "$i" ]; then continue; fi echo patching "$i" $out/bin/patchelf --set-rpath $out/lib --force-rpath "$i" diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index e9104dd88cfa1..48f6d054b159c 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -212,13 +212,6 @@ in gcc-unwrapped coreutils gnugrep; ${localSystem.libc} = getLibc prevStage; - - # A threaded perl build needs glibc/libpthread_nonshared.a, - # which is not included in bootstrapTools, so disable threading. - # This is not an issue for the final stdenv, because this perl - # won't be included in the final stdenv and won't be exported to - # top-level pkgs as an override either. - perl = super.perl.override { enableThreading = false; }; }; })