Revert "bintools-wrapper: skip dynamic linker for static binaries"

This reverts commit ccfd26ef14.

These toolchain changes are too problematic, so reverting for now; see
https://github.com/NixOS/nixpkgs/pull/107086#issuecomment-749196366
This commit is contained in:
Vladimír Čunát
2020-12-21 22:27:48 +01:00
parent bf444739ec
commit 363175cd99
5 changed files with 12 additions and 43 deletions
@@ -243,7 +243,13 @@ stdenv.mkDerivation {
if [ -e ${libc_lib}/lib/32/ld-linux.so.2 ]; then
echo ${libc_lib}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32
fi
'') + ''
''
# The dynamic linker is passed in `ldflagsBefore' to allow
# explicit overrides of the dynamic linker by callers to ld
# (the *last* value counts, so ours should come first).
+ ''
echo -dynamic-linker "$dynamicLinker" >> $out/nix-support/libc-ldflags-before
'') + ''
fi
'')