aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-bootstrap
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-03-17 05:01:26 +0000
committerAlan Modra <amodra@gmail.com>2009-03-17 05:01:26 +0000
commiteccbf555f3ce464cc9f9a7b84347ffa79181e9bb (patch)
tree1d0bdd86493f1efa808045c8fdf7dc211b7124f9 /ld/testsuite/ld-bootstrap
parentfee0be5dee06e5f8118e8070872ba73947097d62 (diff)
downloadfsf-binutils-gdb-eccbf555f3ce464cc9f9a7b84347ffa79181e9bb.zip
fsf-binutils-gdb-eccbf555f3ce464cc9f9a7b84347ffa79181e9bb.tar.gz
fsf-binutils-gdb-eccbf555f3ce464cc9f9a7b84347ffa79181e9bb.tar.bz2
ld/
* configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL. * Makefile.am (check-DEJAGNU): Set DO_COMPARE. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. ld/testsuite/ * ld-bootstrap/bootstrap.exp: Use DO_COMPARE. Remove unnecessary cleanup and log output.
Diffstat (limited to 'ld/testsuite/ld-bootstrap')
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp28
1 files changed, 13 insertions, 15 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index d84897d..e7b4246 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -145,8 +145,6 @@ foreach flags {"" "strip" "--static" "--traditional-format"
}
}
- send_log "compare (tail of) tmpdir/ld2 tmpdir/ld3\n"
- verbose "compare (tail of) tmpdir/ld2 tmpdir/ld3"
if {[istarget "*-*-pe"]
|| [istarget "*-*-wince"]
|| [istarget "*-*-cygwin*"]
@@ -155,19 +153,19 @@ foreach flags {"" "strip" "--static" "--traditional-format"
|| [istarget "*-*-interix*"]
|| [istarget "*-*-beospe*"]
|| [istarget "*-*-netbsdpe*"]} {
- # Trim off the date present in PE binaries by only looking
- # at the ends of the files
- # Although this works, a way to set the date would be better.
- # Removing or zeroing the date stamp in the binary produced by
- # the linker is not possible as it is required by the target OS.
- exec tail +140 tmpdir/ld2 >tmpdir/ld2tail
- exec tail +140 tmpdir/ld3 >tmpdir/ld3tail
- catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output
- exec rm tmpdir/ld2tail tmpdir/ld3tail
+ # Trim off the date present in PE binaries by only looking
+ # at the ends of the files
+ # Although this works, a way to set the date would be better.
+ # Removing or zeroing the date stamp in the binary produced by
+ # the linker is not possible as it is required by the target OS.
+ set do_compare [string map {16 220 f1 tmpdir/ld2 f2 tmpdir/ld3 tmp-foo1 tmpdir/ld2tail tmp-foo2 tmpdir/ld3tail} $DO_COMPARE]
+ send_log "$do_compare\n"
+ verbose "$do_compare"
+ catch "exec sh -c [list $do_compare]" exec_output
} else {
- send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
- verbose "cmp tmpdir/ld2 tmpdir/ld3"
- catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
+ send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
+ verbose "cmp tmpdir/ld2 tmpdir/ld3"
+ catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
}
set exec_output [prune_warnings $exec_output]
@@ -182,4 +180,4 @@ foreach flags {"" "strip" "--static" "--traditional-format"
}
catch "exec rm -f tmpdir/ld-partial.o tmpdir/ld1 tmpdir/ld2 tmpdir/ld3" status
-catch "exec rm -f tmpdir/ld1tail tmpdir/ld2tail tmpdir/ld3tail" status
+catch "exec rm -f tmpdir/ld2tail tmpdir/ld3tail" status