aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/Makefile.am18
-rw-r--r--gas/Makefile.in19
-rwxr-xr-xgas/configure35
-rw-r--r--gas/configure.ac1
-rw-r--r--gas/doc/Makefile.in1
6 files changed, 56 insertions, 26 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c95decc..589c986 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/Makefile.am b/gas/Makefile.am
index cdaf9f5..cac7c7f 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -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*
diff --git a/gas/Makefile.in b/gas/Makefile.in
index 84f746d..70578ad 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -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*
diff --git a/gas/configure b/gas/configure
index 08d4ed0..dbd986a 100755
--- a/gas/configure
+++ b/gas/configure
@@ -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 :
diff --git a/gas/configure.ac b/gas/configure.ac
index c0d5989..b830d9e 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -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],
diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in
index 474bd48..7110192 100644
--- a/gas/doc/Makefile.in
+++ b/gas/doc/Makefile.in
@@ -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@