From 1983fbac47a0b7d202177901477a3de326d339dd Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 29 Nov 2001 17:34:07 +0000 Subject: [PATCH] 2001-11-29 H.J. Lu * binutils-all/objcopy.exp (strip_test): Add strip on archive. --- binutils/testsuite/ChangeLog | 4 +++ binutils/testsuite/binutils-all/objcopy.exp | 29 +++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index e6f0d945752..90b786a5cda 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-11-29 H.J. Lu + + * binutils-all/objcopy.exp (strip_test): Add strip on archive. + 2001-11-15 Alan Modra * binutils-all/objcopy.exp: Allow '? main', to suit powerpc64. diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 7c16a515a1b..406b09d7bee 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -314,6 +314,7 @@ if {$low == "" || $origstart == ""} then { # Test stripping an object. proc strip_test { } { + global AR global CC global STRIP global STRIPFLAGS @@ -329,6 +330,34 @@ proc strip_test { } { return } + if [is_remote host] { + set archive libstrip.a + set objfile [remote_download host tmpdir/testprog.o]; + remote_file host delete $archive + } else { + set archive tmpdir/libstrip.a + set objfile tmpdir/testprog.o + } + + remote_file build delete tmpdir/libstrip.a + + set exec_output [binutils_run $AR "rc $archive ${objfile}"] + if ![string match "" $exec_output] { + fail $test + return + } + + set exec_output [binutils_run $STRIP "$STRIPFLAGS $archive"] + if ![string match "" $exec_output] { + fail $test + return + } + + if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog.o object debug] != "" } { + untested $test + return + } + if [is_remote host] { set objfile [remote_download host tmpdir/testprog.o]; } else { -- 2.30.2