From 65221567c12eb20d1254f6bc1b573e126af43645 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Nov 2014 10:23:26 +0100 Subject: [PATCH] glibc: Include a copy of libgcc_s.so.1 This prevents failures like "libgcc_s.so.1 must be installed for pthread_cancel to work" that occur because Glibc assumes libgcc_s.so.1 to be in Glibc's libdir. This solution is pretty hacky, because the libgcc_s.so.1 from bootstrap-tools might be too old. So if we update GCC, programs might end up using an outdated libgcc_s.so.1. Ideally, we would build libgcc_s.so.1 *before* Glibc, which might not be impossible... Fixes #3548. --- pkgs/development/libraries/glibc/builder.sh | 4 ---- pkgs/development/libraries/glibc/default.nix | 2 +- pkgs/tools/filesystems/squashfs/default.nix | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh index 3b077cbb3fd5..2836063e3bf4 100644 --- a/pkgs/development/libraries/glibc/builder.sh +++ b/pkgs/development/libraries/glibc/builder.sh @@ -46,10 +46,6 @@ postInstall() { ln -s lib $out/lib64 fi - # This file, that should not remain in the glibc derivation, - # may have not been created during the preInstall - rm -f $out/lib/libgcc_s.so.1 - # Get rid of more unnecessary stuff. rm -rf $out/var $out/sbin/sln } diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 52a94bd0a0d5..1abba35af088 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -35,7 +35,7 @@ in preInstall = '' if [ -f ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 ]; then mkdir -p $out/lib - ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + cp ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 fi ''; diff --git a/pkgs/tools/filesystems/squashfs/default.nix b/pkgs/tools/filesystems/squashfs/default.nix index a016627b7a47..5e1700af0178 100644 --- a/pkgs/tools/filesystems/squashfs/default.nix +++ b/pkgs/tools/filesystems/squashfs/default.nix @@ -12,8 +12,6 @@ stdenv.mkDerivation rec { buildInputs = [ zlib xz ]; preBuild = "cd squashfs-tools"; - - NIX_LDFLAGS = "-lgcc_s"; # for pthread_cancel installFlags = "INSTALL_DIR=\${out}/bin";