diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-02-21 16:20:51 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-02-21 16:20:51 +0000 |
commit | e7570bb9cffdabb080c60c8fda67a0061ce44421 (patch) | |
tree | 3e334c8030b71de682ff6593c37d3308c34fdfc5 | |
parent | 5e985bc3757e6b9120ded17136b5f560a7ee88d5 (diff) | |
download | nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.tar nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.tar.gz nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.tar.bz2 nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.tar.lz nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.tar.xz nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.tar.zst nixpkgs-e7570bb9cffdabb080c60c8fda67a0061ce44421.zip |
* Don't strip all symbols from $out/bin by default, since it makes
stack traces impossible. * When stripping all symbols on Darwin, don't use the "-s" flag since it has a completely different meaning (it takes an argument specifying a file containing a list of symbols). svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10809
-rw-r--r-- | pkgs/stdenv/darwin/prehook.sh | 3 | ||||
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 17 |
2 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/stdenv/darwin/prehook.sh b/pkgs/stdenv/darwin/prehook.sh index d2f00c59257..0232ee2bb6f 100644 --- a/pkgs/stdenv/darwin/prehook.sh +++ b/pkgs/stdenv/darwin/prehook.sh @@ -2,4 +2,5 @@ export NIX_ENFORCE_PURITY= export NIX_DONT_SET_RPATH=1 export NIX_NO_SELF_RPATH=1 dontFixLibtool=1 -NIX_STRIP_DEBUG=0 \ No newline at end of file +NIX_STRIP_DEBUG=0 +stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 395de988e4c..9f4bfc635d0 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -232,7 +232,7 @@ stripDirs() { dirs=${dirsNew} if test -n "${dirs}"; then - echo $dirs + echo "stripping (with flags $stripFlags) in $dirs" find $dirs -type f -print0 | xargs -0 strip $stripFlags || true fi } @@ -715,12 +715,15 @@ fixupPhase() { # TODO: strip _only_ ELF executables, and return || fail here... if test -z "$dontStrip"; then - stripDebugList=${stripDebugList:-lib} - echo "stripping debuging symbols from files in $stripDebugList" - stripDirs "$stripDebugList" -S - stripAllList=${stripAllList:-bin sbin} - echo "stripping all symbols from files in $stripAllList" - stripDirs "$stripAllList" -s + stripDebugList=${stripDebugList:-lib bin sbin} + if test -n "$stripDebugList"; then + stripDirs "$stripDebugList" "${stripDebugFlags:--S}" + fi + + stripAllList=${stripAllList:-} + if test -n "$stripAllList"; then + stripDirs "$stripAllList" "${stripAllFlags:--s}" + fi fi if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then |