[llvm] r242721 - Since BSD cmp(1) does not support the --ignore-initial option, use the

Dimitry Andric dimitry at andric.com
Mon Jul 20 15:07:27 PDT 2015


Author: dim
Date: Mon Jul 20 17:07:27 2015
New Revision: 242721

URL: http://llvm.org/viewvc/llvm-project?rev=242721&view=rev
Log:
Since BSD cmp(1) does not support the --ignore-initial option, use the
more portable 3rd and 4th arguments to skip the first 16 bytes during
the comparison of Phase2 and Phase3 objects.

Modified:
    llvm/trunk/utils/release/test-release.sh

Modified: llvm/trunk/utils/release/test-release.sh
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/test-release.sh?rev=242721&r1=242720&r2=242721&view=diff
==============================================================================
--- llvm/trunk/utils/release/test-release.sh (original)
+++ llvm/trunk/utils/release/test-release.sh Mon Jul 20 17:07:27 2015
@@ -486,8 +486,8 @@ for Flavor in $Flavors ; do
             # Substitute 'Phase2' for 'Phase3' in the Phase 2 object file in
             # case there are build paths in the debug info. On some systems,
             # sed adds a newline to the output, so pass $p3 through sed too.
-            if ! cmp --ignore-initial=16 <(sed -e 's,Phase2,Phase3,g' $p2) \
-                    <(sed -e '' $p3) > /dev/null 2>&1 ; then
+            if ! cmp -s <(sed -e 's,Phase2,Phase3,g' $p2) <(sed -e '' $p3) \
+                    16 16 ; then
                 echo "file `basename $p2` differs between phase 2 and phase 3"
             fi
         done





More information about the llvm-commits mailing list