mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
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.
This commit is contained in:
parent
60d6eb7a9a
commit
51b1297c8a
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user