From d7b784871a7fae00ddc8d0110061476db0c276e9 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 12 Nov 2001 16:26:17 +0000 Subject: [PATCH] Only compare the tail end of the two binary files produced in order to avoid date stamp present in PE binaries. --- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-bootstrap/bootstrap.exp | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7555ce9af6..3855377889 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2001-11-12 Donn Terry + + * ld-bootstrap/bootstrap.exp: Only compare the tail end of the two + binary files produced in order to avoid date stamp present in PE + binaries. + 2001-11-11 Hans-Peter Nilsson * ld-mmix/sec-5.d (Sections): Add whitespace missing in commit. diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index 6eb40a2787..0e82a6abc9 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -127,9 +127,17 @@ foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"} } } - 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 "compare (tail of) tmpdir/ld2 tmpdir/ld3\n" + verbose "compare (tail of) tmpdir/ld2 tmpdir/ld3" + # 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 set exec_output [prune_warnings $exec_output] if [string match "" $exec_output] then { -- 2.34.1