Skip to content

Commit 8119c17

Browse files
committed
Latest stripper (NOW WITH SOLARIS SUPPORT!)
1 parent 5c7f67a commit 8119c17

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

inst/tools/stripper

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
check_supported_linker()
2121
{
2222
if [ "$1" != "" ]; then
23-
OUTPUT=`$1 --version`
23+
OUTPUT=`$1 --version 2>&1`
2424
case "$OUTPUT" in
2525
GNU?ld*) return 1 ;;
2626
GNU?gold*) return 1 ;;
27+
*Solaris?Link?Editors*) return 3 ;;
2728
esac
2829
fi
2930

@@ -44,6 +45,8 @@ check_supported_linker_command()
4445

4546
if [ $RETURN_CODE -eq 1 ]; then
4647
return 2
48+
elif [ $RETURN_CODE -eq 3 ]; then
49+
return 4
4750
elif [ $RETURN_CODE -eq 0 ]; then
4851
OUTPUT=`$1 --version`
4952
LD_PROG=""
@@ -178,6 +181,10 @@ if [ $SHLIB_LD_RESULT -eq $SHLIB_CXXLD_RESULT ]; then
178181
ARGUMENT="-Wl,-S"
179182
elif [ $SHLIB_LD_RESULT -eq 2 ]; then
180183
ARGUMENT="-S"
184+
elif [ $SHLIB_LD_RESULT -eq 3 ]; then
185+
ARGUMENT="-Wl,-zstrip-class=debug"
186+
elif [ $SHLIB_LD_RESULT -eq 4 ]; then
187+
ARGUMENT="-zstrip-class=debug"
181188
fi
182189
fi
183190

0 commit comments

Comments
 (0)