Commit 6cf1ac42 by Paolo Bonzini Committed by Paolo Bonzini

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
parent f964bd29
2004-04-28 Paolo Bonzini <bonzini@gnu.org>
* config/acx.m4: Fix fastcompare support for new-bootstrap.
* configure: Regenerate.
2004-04-27 Paolo Bonzini <bonzini@gnu.org> 2004-04-27 Paolo Bonzini <bonzini@gnu.org>
Revert: Revert:
......
...@@ -193,3 +193,34 @@ else ...@@ -193,3 +193,34 @@ else
have_gnat=no have_gnat=no
fi 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)
])
...@@ -1855,7 +1855,7 @@ fi ...@@ -1855,7 +1855,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1860: checking for $ac_word" >&5 echo "configure:1859: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1885,7 +1885,7 @@ if test -z "$CC"; then ...@@ -1885,7 +1885,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1890: checking for $ac_word" >&5 echo "configure:1889: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1936,7 +1936,7 @@ fi ...@@ -1936,7 +1936,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1941: checking for $ac_word" >&5 echo "configure:1940: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1968,7 +1968,7 @@ fi ...@@ -1968,7 +1968,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1973: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:1972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...@@ -1979,12 +1979,12 @@ cross_compiling=$ac_cv_prog_cc_cross ...@@ -1979,12 +1979,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 1984 "configure" #line 1983 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
...@@ -2010,12 +2010,12 @@ if test $ac_cv_prog_cc_works = no; then ...@@ -2010,12 +2010,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2015: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:2014: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2020: checking whether we are using GNU C" >&5 echo "configure:2019: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2024,7 +2024,7 @@ else ...@@ -2024,7 +2024,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
...@@ -2043,7 +2043,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ...@@ -2043,7 +2043,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2048: checking whether ${CC-cc} accepts -g" >&5 echo "configure:2047: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2079,7 +2079,7 @@ fi ...@@ -2079,7 +2079,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2084: checking for $ac_word" >&5 echo "configure:2083: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2111,7 +2111,7 @@ if test -n "$ac_tool_prefix"; then ...@@ -2111,7 +2111,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args. # Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2 set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2116: checking for $ac_word" >&5 echo "configure:2115: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2144,7 +2144,7 @@ fi ...@@ -2144,7 +2144,7 @@ fi
fi fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6 echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
echo "configure:2149: checking whether compiler driver understands Ada" >&5 echo "configure:2148: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2177,22 +2177,23 @@ else ...@@ -2177,22 +2177,23 @@ else
fi fi
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6 echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
echo "configure:2182: checking how to compare bootstrapped objects" >&5 echo "configure:2181: checking how to compare bootstrapped objects" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
echo abfoo >t1 echo abfoo >t1
echo cdfoo >t2 echo cdfoo >t2
gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2' 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=2 t1 t2 > /dev/null 2>&1; then
if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
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
else else
gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2' gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment