glibc: re-enable stripping in cross builds

References to the host toolchain are leaking through debug symbols in
glibc, causing gnu cross-builds to always depend on the host toolchain.
The decision to not strip was made in 2012 in order to improve GNU/Hurd
support, and I suspect the reasons that justified it back then do not
apply anymore in 2019.

Closure size before:
/nix/store/v5pxj0bgg627hic2khk4d43z6cjp5v7d-hello-2.10-armv7l-unknown-linux-gnueabihf                            596.8M

After:
/nix/store/llp1ncmpar406rc2vhj7g5ix4yqwna3n-hello-2.10-armv7l-unknown-linux-gnueabihf     23.6M
This commit is contained in:
Pierre Bourdon 2019-04-17 19:50:02 +02:00
parent d32b5e5760
commit 03f618d9cf
No known key found for this signature in database
GPG Key ID: 6FB80DCD84DA0F1C

@ -214,10 +214,6 @@ stdenv.mkDerivation ({
// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
preInstall = null; # clobber the native hook
dontStrip = true;
separateDebugInfo = false; # this is currently broken for crossDrv
# To avoid a dependency on the build system 'bash'.
preFixup = ''
rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}