Use ACX_PROG_CMP_IGNORE_INITIAL in gas

* configure.ac: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
	* Makefile.am (comparison): Rewrite using do_compare.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
This commit is contained in:
Alan Modra 2016-11-21 20:18:41 +10:30
parent 081f6b931d
commit 2d7f2507d4
6 changed files with 56 additions and 26 deletions

View File

@ -1,3 +1,11 @@
2016-11-21 Alan Modra <amodra@gmail.com>
* configure.ac: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
* Makefile.am (comparison): Rewrite using do_compare.
* configure: Regenerate.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
2016-11-18 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/cl-warn.s: New file.

View File

@ -667,21 +667,15 @@ stage3:
against=stage2
# This rule is derived from corresponding code in the Makefile.in for gcc.
# The "tail +16c" is to bypass headers which may include timestamps or
# temporary assembly file names.
comparison:
x=0 ; \
for file in *.@OBJEXT@ ; do \
tail +16c ./$$file > tmp-foo1; \
if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
if cmp tmp-foo1 tmp-foo2 ; then \
true ; \
else \
echo $$file differs ; \
x=1 ; \
fi ; \
else true; fi ; \
f1=./$$file; f2=${against}/$$file; \
$(do_compare) > /dev/null 2>&1; \
if test $$? -ne 0; then \
echo $$file differs ; \
x=1 ; \
fi ; \
done ; \
exit $$x
-rm -f tmp-foo*

View File

@ -282,6 +282,7 @@ builddir = @builddir@
cgen_cpu_prefix = @cgen_cpu_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
do_compare = @do_compare@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
@ -2745,21 +2746,15 @@ stage3:
-mv $(STAGESTUFF) stage3
if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
# This rule is derived from corresponding code in the Makefile.in for gcc.
# The "tail +16c" is to bypass headers which may include timestamps or
# temporary assembly file names.
comparison:
x=0 ; \
for file in *.@OBJEXT@ ; do \
tail +16c ./$$file > tmp-foo1; \
if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
if cmp tmp-foo1 tmp-foo2 ; then \
true ; \
else \
echo $$file differs ; \
x=1 ; \
fi ; \
else true; fi ; \
f1=./$$file; f2=${against}/$$file; \
$(do_compare) > /dev/null 2>&1; \
if test $$? -ne 0; then \
echo $$file differs ; \
x=1 ; \
fi ; \
done ; \
exit $$x
-rm -f tmp-foo*

35
gas/configure vendored
View File

@ -644,6 +644,7 @@ WARN_WRITE_STRINGS
NO_WERROR
WARN_CFLAGS_FOR_BUILD
WARN_CFLAGS
do_compare
OTOOL64
OTOOL
LIPO
@ -10986,7 +10987,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10989 "configure"
#line 10990 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11092,7 +11093,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11095 "configure"
#line 11096 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11653,6 +11654,36 @@ rm -rf conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compare bootstrapped objects" >&5
$as_echo_n "checking how to compare bootstrapped objects... " >&6; }
if test "${gcc_cv_prog_cmp_skip+set}" = set; then :
$as_echo_n "(cached) " >&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
:
else
gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
fi
fi
rm t1 t2
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
do_compare="$gcc_cv_prog_cmp_skip"
# Check whether --enable-targets was given.
if test "${enable_targets+set}" = set; then :

View File

@ -40,6 +40,7 @@ AC_USE_SYSTEM_EXTENSIONS
LT_INIT
ACX_LARGEFILE
ACX_PROG_CMP_IGNORE_INITIAL
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations besides the primary],

View File

@ -257,6 +257,7 @@ builddir = @builddir@
cgen_cpu_prefix = @cgen_cpu_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
do_compare = @do_compare@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@