Skip to content

Commit

Permalink
2000-08-03 H.J. Lu (hjl@gnu.org)
Browse files Browse the repository at this point in the history
	* ld-bootstrap/bootstrap.exp: Add strip.
  • Loading branch information
H.J. Lu committed Aug 3, 2000
1 parent 8a75a3c commit 25c1ca4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ld/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2000-08-03 H.J. Lu (hjl@gnu.org)

* ld-bootstrap/bootstrap.exp: Add strip.

2000-07-24 H.J. Lu (hjl@gnu.org)

* ld-elfvsb/elfvsb.exp: Add -g to $CC to get the location of
Expand Down
21 changes: 18 additions & 3 deletions ld/testsuite/ld-bootstrap/bootstrap.exp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ if ![isnative] {
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
# new ld, ld3. ld2 and ld3 should be identical.

foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
if {"$flags" != ""} {
foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"} {
set do_strip "no"
if {"$flags" == "strip"} {
set testname "bootstrap with $flags"
set flags ""
set do_strip "yes"
} else { if {"$flags" != ""} {
set testname "bootstrap with $flags"
} else {
set testname "bootstrap"
}
}}

# This test can only be run if we have the ld build directory,
# since we need the object files.
Expand Down Expand Up @@ -77,6 +82,16 @@ foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
continue
}

if {"$do_strip" == "yes"} {
verbose -log "$strip tmpdir/ld1"
catch "exec $strip tmpdir/ld1" exec_output
if ![string match "" $exec_output] then {
verbose -log "$exec_output"
fail $testname
continue
}
}

if ![ld_link tmpdir/ld1 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
fail $testname
continue
Expand Down

0 comments on commit 25c1ca4

Please sign in to comment.