* 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
This commit is contained in:
Eelco Dolstra 2008-02-21 16:20:51 +00:00
parent 5e985bc375
commit e7570bb9cf
2 changed files with 12 additions and 8 deletions

View file

@ -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
NIX_STRIP_DEBUG=0
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"

View file

@ -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