aboutsummaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-30 15:08:17 +0000
committerNick Clifton <nickc@redhat.com>2011-06-30 15:08:17 +0000
commit75d5a45f82040ef3e85023926a1840e27f127d73 (patch)
tree6552852c379cc92e4456a8a72d0b8a1c55e0847b /binutils/ar.c
parent5f4cb1986d38875f7541b53e41ae7fb1e7460f14 (diff)
downloadgdb-75d5a45f82040ef3e85023926a1840e27f127d73.zip
gdb-75d5a45f82040ef3e85023926a1840e27f127d73.tar.gz
gdb-75d5a45f82040ef3e85023926a1840e27f127d73.tar.bz2
PR binutils/12558
* ar.c (main): When asked to move members in an archive that is being created, ignore the move request.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index 42cc0c6..f8c977a 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -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: