diff options
author | Nick Clifton <nickc@redhat.com> | 2011-06-30 15:08:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2011-06-30 15:08:16 +0000 |
commit | 5a401dd7ee72fef5e4fdcb2e2bbe9a9a743a6190 (patch) | |
tree | 968a4f99ddf5875fa14281211f05ea90036c3106 /binutils/ar.c | |
parent | 9323689700e265a2631bb9551327e635c7e72f63 (diff) | |
download | binutils-redhat-5a401dd7ee72fef5e4fdcb2e2bbe9a9a743a6190.tar.gz |
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.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index 42cc0c6914..f8c977abcd 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: |