diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-04-29 07:40:05 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-04-29 07:40:05 +0000 |
commit | 6cf1ac42db0684f0c386ec9a665ddcaa12a4f1c9 (patch) | |
tree | 978c13340606f22c6e8fd96d9775d5b6ed313a24 /config/acx.m4 | |
parent | f964bd29f1d8a34990937c5a13e4356257e43a80 (diff) | |
download | gcc-6cf1ac42db0684f0c386ec9a665ddcaa12a4f1c9.zip gcc-6cf1ac42db0684f0c386ec9a665ddcaa12a4f1c9.tar.gz gcc-6cf1ac42db0684f0c386ec9a665ddcaa12a4f1c9.tar.bz2 |
acx.m4: Fix fastcompare support for new-bootstrap.
2004-04-28 Paolo Bonzini <bonzini@gnu.org>
* config/acx.m4: Fix fastcompare support for new-bootstrap.
* configure: Regenerate.
From-SVN: r81281
Diffstat (limited to 'config/acx.m4')
-rw-r--r-- | config/acx.m4 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/config/acx.m4 b/config/acx.m4 index 9b40d4f..3652836 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -193,3 +193,34 @@ else have_gnat=no fi ]) + +dnl 'make compare' can be significantly faster, if cmp itself can +dnl skip bytes instead of using tail. The test being performed is +dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" +dnl but we need to sink errors and handle broken shells. We also test +dnl for the parameter format "cmp file1 file2 skip1 skip2" which is +dnl accepted by cmp on some systems. +AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL], +[AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip, +[ echo abfoo >t1 + echo cdfoo >t2 + gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2' + if cmp t1 t2 2 2 > /dev/null 2>&1; then + if cmp t1 t2 1 1 > /dev/null 2>&1; then + : + else + gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16' + fi + fi + if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then + if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then + : + else + gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2' + fi + fi + rm t1 t2 +]) +do_compare="$gcc_cv_prog_cmp_skip" +AC_SUBST(do_compare) +]) |