From 12ef062a403bcc52e90cf2b32bb6f17db9358cb9 Mon Sep 17 00:00:00 2001 From: hjl Date: Sun, 16 Oct 2011 19:36:10 +0000 Subject: [PATCH] Set target from the the first object only if it isn't set. 2011-10-16 H.J. Lu 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 | 6 ++++++ binutils/ar.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4dcc376da1..b344d01d9c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2011-10-16 H.J. Lu + + 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 Fixes to aid translation: diff --git a/binutils/ar.c b/binutils/ar.c index 7b3c3fa022..882ef1ac0d 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; -- 2.11.0