Set target from the the first object only if it isn't set.
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 16 Oct 2011 19:36:10 +0000 (19:36 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 16 Oct 2011 19:36:10 +0000 (19:36 +0000)
2011-10-16  H.J. Lu  <hongjiu.lu@intel.com>

PR binutils/13278
* ar.c (open_inarch): Set the target from the the first object
on the list only if it isn't set.

binutils/ChangeLog
binutils/ar.c

index 4dcc376da119f40239f12366cda987274388a611..b344d01d9c9ffac70d2c835a5f12ae2aec6ad2e3 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/13278
+       * ar.c (open_inarch): Set the target from the the first object
+       on the list only if it isn't set.
+
 2011-10-13  Nick Clifton  <nickc@redhat.com>
 
        Fixes to aid translation:
index 7b3c3fa0229dd312607a93dd5e061c9a5b989dc0..882ef1ac0de27e9ddd35899472ba4756bdc139cc 100644 (file)
@@ -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;
 
This page took 0.026011 seconds and 4 git commands to generate.