summaryrefslogtreecommitdiff
path: root/contrib/compare-debug
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-26 06:40:31 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-26 06:40:31 +0000
commit8b96682aaf640682ddd6713c47e50d139694e3dd (patch)
tree80e060f044a146e5f5285e7c8746c978a9f3307f /contrib/compare-debug
parentd9ab39c7c4aa77720c709cf0d0e563e382723a64 (diff)
downloadgcc-8b96682aaf640682ddd6713c47e50d139694e3dd.tar.gz
* compare-debug: Introduce -p flag to preserve .stripped files.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130431 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib/compare-debug')
-rwxr-xr-xcontrib/compare-debug11
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/compare-debug b/contrib/compare-debug
index f1500b60788..6e979e9d786 100755
--- a/contrib/compare-debug
+++ b/contrib/compare-debug
@@ -21,6 +21,15 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
+rm='rm -f'
+
+case $1 in
+-p | --preserve)
+ rm='echo preserving'
+ shift
+ ;;
+esac
+
if test $# != 2; then
echo 'usage: compare-debug file1.o file2.o' >&2
exit 1
@@ -60,7 +69,7 @@ else
status=1
fi
-rm -f "$1.$suf1" "$2.$suf2"
+$rm "$1.$suf1" "$2.$suf2"
trap "exit $status; exit" 0 1 2 15