3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Eelco Dolstra 2014-11-11 10:23:26 +01:00
parent 3bd2cfa853
commit 65221567c1
3 changed files with 1 additions and 7 deletions

View file

@ -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
}

View file

@ -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
'';

View file

@ -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";