2001-11-29 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 29 Nov 2001 17:34:07 +0000 (17:34 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 29 Nov 2001 17:34:07 +0000 (17:34 +0000)
* binutils-all/objcopy.exp (strip_test): Add strip on archive.

binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/objcopy.exp

index e6f0d9457528c4e2d3beb928a47be7c7aeda49fe..90b786a5cdab952b4cd737aed52c2cf0df627517 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-29  H.J. Lu <hjl@gnu.org>
+
+       * binutils-all/objcopy.exp (strip_test): Add strip on archive.
+
 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
 
        * binutils-all/objcopy.exp: Allow '? main', to suit powerpc64.
index 7c16a515a1bea9d18f3e3caa0200b7ecdaed210c..406b09d7bee4e3bfc0cc062296cf10a8f873527d 100644 (file)
@@ -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 {
This page took 0.0256 seconds and 4 git commands to generate.