http://sourceware.org/bugzilla/show_bug.cgi?id=13278

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-15 21:06:50 
UTC ---
open_inarch sets the target from the first object on the list even when
the target has been set.  This patch works for me:

diff --git a/binutils/ar.c b/binutils/ar.c
index 7b3c3fa..5efc6b6 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -815,9 +815,9 @@ open_inarch (const char *archive_filename, const char
*file)
     return NULL;
   }

-      /* Try to figure out the target to use for the archive from the
-         first object on the list.  */
-      if (file != NULL)
+      /* If the target isn't set, try to figure out the target to use
+   for the archive from the first object on the list.  */
+      if (target == NULL && file != NULL)
   {
     bfd *obj;

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to