summaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index f8c977abcdc..22be2cd053d 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;