PR binutils/12558
authorNick Clifton <nickc@redhat.com>
Thu, 30 Jun 2011 15:08:17 +0000 (15:08 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 30 Jun 2011 15:08:17 +0000 (15:08 +0000)
* ar.c (main): When asked to move members in an archive that is
being created, ignore the move request.

binutils/ChangeLog
binutils/ar.c

index 69140c277022cecf0afa3329fa7d984e24fbf399..b34cd88f534bc41faa0806b793f769771130c087 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-30  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/12558
+       * ar.c (main): When asked to move members in an archive that is
+       being created, ignore the move request.
+
 2011-06-29  Nick Clifton  <nickc@redhat.com>
 
        * readelf.c (get_section_type_name): When displaying an unknown
index 42cc0c6914cb5228e3cad1568cf48568ce7506cf..f8c977abcdcfcbdb917a25ea5b5114102c600180 100644 (file)
@@ -745,11 +745,17 @@ main (int argc, char **argv)
          break;
 
        case move:
-         if (files != NULL)
-           move_members (arch, files);
-         else
-           output_filename = NULL;
-         break;
+         /* PR 12558: Creating and moving at the same time does
+            not make sense.  Just create the archive instead.  */
+         if (! silent_create)
+           {
+             if (files != NULL)
+               move_members (arch, files);
+             else
+               output_filename = NULL;
+             break;
+           }
+         /* Fall through.  */
 
        case replace:
        case quick_append: