From c9af384513858f3e30bdb71c12662dd1e5f9f673 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 8 Nov 2020 15:07:28 +0000 Subject: [PATCH] Re: dependency list for static libraries This feature doesn't actually require plugin support, that was a mistake in the previous patch. Fixes these fails: hppa-hp-hpux10 +FAIL: ar adding library dependencies i386-bsd +FAIL: ar adding library dependencies i386-msdos +FAIL: ar adding library dependencies ns32k-netbsd +FAIL: ar adding library dependencies ns32k-pc532-mach +FAIL: ar adding library dependencies pdp11-dec-aout +FAIL: ar adding library dependencies * ar.c (main): Use plugin_target rather than "target" when resetting libdeps_bfd target. --- binutils/ChangeLog | 5 +++++ binutils/ar.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2aa6a327624..2e24fafb767 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2020-11-09 Howard Chu + + * ar.c (main): Use plugin_target rather than "target" when + resetting libdeps_bfd target. + 2020-11-06 H.J. Lu * elfedit.c: Include "libiberty.h". diff --git a/binutils/ar.c b/binutils/ar.c index 56c758cc1af..537b139e98f 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -866,7 +866,7 @@ main (int argc, char **argv) /* Create a bfd to contain the dependencies. It inherits its type from arch, but we must set the type to "binary" otherwise bfd_bwrite() will fail. After writing, we - must set the type back to "plugin" otherwise adding it to the + must set the type back to default otherwise adding it to the archive will fail. */ libdeps_bfd = bfd_create (LIBDEPS, arch); if (libdeps_bfd == NULL) @@ -887,7 +887,7 @@ main (int argc, char **argv) if (! bfd_make_readable (libdeps_bfd)) fatal (_("Cannot make libdeps object readable.")); - if (bfd_find_target ("plugin", libdeps_bfd) == NULL) + if (bfd_find_target (plugin_target, libdeps_bfd) == NULL) fatal (_("Cannot reset libdeps record type.")); /* Append our libdeps record to the list of files -- 2.30.2