git.iko.soy/typeable/nixpkgs
on master help sign in
glibc: include ldd and other scripts in cross-builds

Since the script interpreters are not patched (anymore?), no reference to any shell is generated by the scripts in glibc's `bin` output: ``` $ nix-store --query --references /nix/store/nmfj3a2k2kr2lypndn37x6qbd8537f9b-glibc-riscv64-unknown-linux-gnu-2.33-50-bin /nix/store/afgfd3vl3x5zx89awn3fjayn83yl9vcy-glibc-riscv64-unknown-linux-gnu-2.33-50 /nix/store/nmfj3a2k2kr2lypndn37x6qbd8537f9b-glibc-riscv64-unknown-linux-gnu-2.33-50-bin ``` This means that it's safe to include the scripts in glibc's bin output even in cross builds. One interesting improvement for the future could be to split these scripts into a separate derivation and properly patch their script interpreter (currently they are using impure /bin/sh).

commite9b9bea26190f6aaaabf01773c982d30aa0d6a66 authorsternenseemann <sternenseemann@systemli.org> dateWed 3 Nov 2021, 11:54 (5 years ago) parent8440edd
1 file changed−5
pkgs/development/libraries/glibc/common.nix−5
pkgs/development/libraries/glibc/common.nix−5
@@ -286,9 +286,4 @@ stdenv.mkDerivation ({
286286
287287// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
288288 preInstall = null; # clobber the native hook
289−
290− # To avoid a dependency on the build system 'bash'.
291− preFixup = ''
292− rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}
293− '';
294289})