From: Alexandre Oliva Date: Mon, 1 Oct 2007 20:27:22 +0000 (+0000) Subject: compare-debug: Avoid spurious errors when .stripped files exist. X-Git-Tag: releases/gcc-4.3.0~2277 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a64036a75c14cb555ece1d7c72a0a8e6834c8cab;p=thirdparty%2Fgcc.git compare-debug: Avoid spurious errors when .stripped files exist. * compare-debug: Avoid spurious errors when .stripped files exist. From-SVN: r128911 --- diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 15b87ac9a7d6..5f99c24e0f85 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2007-10-01 Alexandre Oliva + + * compare-debug: Avoid spurious errors when .stripped files + exist. + 2007-09-22 Hans-Peter Nilsson * warn_summary (srcdirFilter): Add fixincludes, sim, diff --git a/contrib/compare-debug b/contrib/compare-debug index c583a59c520a..f1500b607884 100755 --- a/contrib/compare-debug +++ b/contrib/compare-debug @@ -36,31 +36,31 @@ if test ! -f "$2"; then exit 1 fi -if test -f "$1".stripped; then - echo "$1".stripped already exists, overwriting >&2 - exit 1 -fi +suf1=stripped +while test -f "$1.$suf1"; do + suf1=$suf1. +done -if test -f "$2".stripped; then - echo "$2".stripped already exists, overwriting >&2 - exit 1 -fi +suf2=stripped +while test -f "$2.$suf2"; do + suf2=$suf2. +done -trap 'rm -f "$1".stripped "$2".stripped' 0 1 2 15 +trap 'rm -f "$1.$suf1" "$2.$suf2"' 0 1 2 15 -cp "$1" "$1".stripped -strip "$1".stripped +cp "$1" "$1.$suf1" +strip "$1.$suf1" -cp "$2" "$2".stripped -strip "$2".stripped +cp "$2" "$2.$suf2" +strip "$2.$suf2" -if cmp "$1".stripped "$2".stripped; then +if cmp "$1.$suf1" "$2.$suf2"; then status=0 else status=1 fi -rm -f "$1".stripped "$2".stripped +rm -f "$1.$suf1" "$2.$suf2" trap "exit $status; exit" 0 1 2 15