diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2015-04-29 10:09:07 +0200 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2015-04-29 10:09:07 +0200 |
commit | 51b1297c8a3fdb9d1abdc98ebbc85e3679373c21 (patch) | |
tree | 59817826926e697862903946f0d3a7184bacf7c3 /pkgs/development/libraries/glibc | |
parent | 60d6eb7a9a43fef931b001efdf06a8856e535ce1 (diff) | |
download | nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.tar nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.tar.gz nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.tar.bz2 nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.tar.lz nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.tar.xz nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.tar.zst nixlib-51b1297c8a3fdb9d1abdc98ebbc85e3679373c21.zip |
glibc: fix libgcc_s.so
It used to be a symlink, but now it is a link script. It's crucial to get proper linking, specially on amrv5tel, where libgcc contains lot of code related to the limited instruction set of the platform. Without this fix, g++ shared lib linking was broken, because a "-lgcc" was not propagated wherever "-lgcc_s" was required. The g++ spec only mentions "-lgcc_s" and the "-lgcc" is introduced with the libgcc_s.so link script, only available in the glibc path after this fix. As a reminder, we put libgcc* in the glibc output to avoid having a runtime dependency on the gcc path only because of the everywhere linked libgcc. This problem was specially visible in platforms like armv5tel, where most programs end up linked to libgcc. Platforms with a more rich instruction set may rarely end up requiring a link to libgcc.
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index f60df4a30d67..ccf6d2c0686e 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -36,7 +36,8 @@ in if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then mkdir -p $out/lib cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 - ln -s libgcc_s.so.1 $out/lib/libgcc_s.so + # the .so It used to be a symlink, but now it is a script + cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so fi ''; |