diff options
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r-- | pkgs/development/libraries/glibc/2.27.nix | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/pkgs/development/libraries/glibc/2.27.nix b/pkgs/development/libraries/glibc/2.27.nix index bb057ae899e..bf63b97635a 100644 --- a/pkgs/development/libraries/glibc/2.27.nix +++ b/pkgs/development/libraries/glibc/2.27.nix @@ -71,14 +71,15 @@ callPackage ./common-2.27.nix { inherit stdenv; } { # Get rid of more unnecessary stuff. rm -rf $out/var $bin/bin/sln - + '' # For some reason these aren't stripped otherwise and retain reference # to bootstrap-tools; on cross-arm this stripping would break objects. - if [ -z "$crossConfig" ]; then - for i in "$out"/lib/*.a; do - [ "$i" = "$out/lib/libm.a" ] || strip -S "$i" - done - fi + + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + + for i in "$out"/lib/*.a; do + [ "$i" = "$out/lib/libm.a" ] || $STRIP -S "$i" + done + '' + '' # Put libraries for static linking in a separate output. Note # that libc_nonshared.a and libpthread_nonshared.a are required diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 976dbcde47f..ea443ce9a24 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -71,14 +71,15 @@ callPackage ./common.nix { inherit stdenv; } { # Get rid of more unnecessary stuff. rm -rf $out/var $bin/bin/sln - + '' # For some reason these aren't stripped otherwise and retain reference # to bootstrap-tools; on cross-arm this stripping would break objects. - if [ -z "$crossConfig" ]; then - for i in "$out"/lib/*.a; do - [ "$i" = "$out/lib/libm.a" ] || strip -S "$i" - done - fi + + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + + for i in "$out"/lib/*.a; do + [ "$i" = "$out/lib/libm.a" ] || $STRIP -S "$i" + done + '' + '' # Put libraries for static linking in a separate output. Note # that libc_nonshared.a and libpthread_nonshared.a are required |