From: bonzini Date: Thu, 29 Apr 2004 07:40:05 +0000 (+0000) Subject: 2004-04-28 Paolo Bonzini X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=697dfd2cb2acd640324565ec3298645b6f6bd4c5;p=pf3gnuchains%2Fgcc-fork.git 2004-04-28 Paolo Bonzini * config/acx.m4: Fix fastcompare support for new-bootstrap. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81281 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/ChangeLog b/ChangeLog index 116abfe41ad..8ba5f3e0839 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-28 Paolo Bonzini + + * config/acx.m4: Fix fastcompare support for new-bootstrap. + * configure: Regenerate. + 2004-04-27 Paolo Bonzini Revert: diff --git a/config/acx.m4 b/config/acx.m4 index 9b40d4f0771..3652836bb8d 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) +]) diff --git a/configure b/configure index cda8359460a..65ecf0975e0 100755 --- a/configure +++ b/configure @@ -1855,7 +1855,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1885,7 +1885,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1936,7 +1936,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1968,7 +1968,7 @@ fi fi 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 # 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 cat > conftest.$ac_ext << EOF -#line 1984 "configure" +#line 1983 "configure" #include "confdefs.h" main(){return(0);} 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 # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; 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; } fi 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 cross_compiling=$ac_cv_prog_cc_cross 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2024,7 +2024,7 @@ else yes; #endif 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 else ac_cv_prog_gcc=no @@ -2043,7 +2043,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2079,7 +2079,7 @@ fi # 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 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -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. set dummy gnatbind; ac_word=$2 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2144,7 +2144,7 @@ fi fi 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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2177,22 +2177,23 @@ else fi 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 echo $ac_n "(cached) $ac_c" 1>&6 else 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 - 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 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2' fi