From: Howard Chu <hyc@symas.com>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] dependency list for static libraries
Date: Sun, 8 Nov 2020 15:07:28 +0000 [thread overview]
Message-ID: <63667fcd-8b9c-d416-3240-9712eeee4658@symas.com> (raw)
In-Reply-To: <20201108013911.GB15956@bubble.grove.modra.org>
[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]
Alan Modra wrote:
> On Tue, Nov 03, 2020 at 03:31:49PM +0000, Howard Chu wrote:
>> Nick Clifton wrote:
>>> Hi Howard,
>>>
>>>> Whitespace fixes done, attached.
>>>
>>> Sorry for the delay in reviewing this patch. This revised form
>>> looks good to me, so I have gone ahead and applied it to the sources.
>
> I now see these failures.
>
> alpha-dec-vms +FAIL: ar adding library dependencies
> hppa-hp-hpux10 +FAIL: ar adding library dependencies
> i386-bsd +FAIL: ar adding library dependencies
> i386-msdos +FAIL: ar adding library dependencies
> ia64-vms +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
> powerpc-aix5.1 +FAIL: ar adding library dependencies
> powerpc-aix5.2 +FAIL: ar adding library dependencies
> rs6000-aix4.3.3 +FAIL: ar adding library dependencies
> rs6000-aix5.1 +FAIL: ar adding library dependencies
> rs6000-aix5.2 +FAIL: ar adding library dependencies
>
> I think these are all targets that default to --disable-plugins. The
> proper fix is to condition all of the added ar.c code on
> BFD_SUPPORTS_PLUGINS, including help text and option processing. And
> then of course not run the new tests if --record-libdeps is not a
> known ar option.
>
Thanks for catching that. This feature doesn't actually require plugin
support, that was a mistake in the previous patch. Fixed here.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
[-- Attachment #2: 0001-ar-fix-libdeps-to-avoid-unnecessary-dependency-on-pl.patch --]
[-- Type: text/x-patch, Size: 1820 bytes --]
From 4d2982a8c62b09a16ba1e9c4913c262f11557017 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@symas.com>
Date: Sun, 8 Nov 2020 15:04:00 +0000
Subject: [PATCH] ar: fix libdeps to avoid unnecessary dependency on plugin
support
Also move __.LIBDEP entry to head of archive instead of tail.
---
binutils/ar.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/binutils/ar.c b/binutils/ar.c
index 56c758cc1a..d886c3b720 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,18 +887,18 @@ 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
+ /* Prepend our libdeps record to the list of files
being operated on. */
new_files = xmalloc ((file_count + 2) * sizeof (char *));
+ new_files[0] = LIBDEPS;
for (i = 0; i < file_count; i++)
- new_files[i] = files[i];
- new_files[i++] = LIBDEPS;
- file_count = i;
+ new_files[i+1] = files[i];
+ file_count = i+1;
files = new_files;
- files[i] = NULL;
+ files[file_count] = NULL;
}
switch (operation)
--
2.20.1
next prev parent reply other threads:[~2020-11-08 15:07 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 15:49 Howard Chu
2017-09-19 15:52 ` Simon Richter
[not found] ` <WM!bae999665f49907786872b93f01ac98d53e7b97e29b4228399d8baadf9ec0ab33db74467d73c998225b250ba1d00a4c0!@mailstronghold-3.zmailcloud.com>
2017-09-19 16:04 ` Howard Chu
2017-09-20 1:42 ` R0b0t1
2017-09-19 16:54 ` Joseph Myers
[not found] ` <WM!83b6ad7285aa96ce69fcd1944d4eae8f20e5f19dfbf161f45313f5393bcffe1b77231520b8f4e24145a3f85eeafb39ed!@mailstronghold-1.zmailcloud.com>
2017-09-19 22:01 ` Howard Chu
2017-09-20 0:20 ` Joseph Myers
2020-09-03 20:42 ` Howard Chu
2020-09-22 10:39 ` Nick Clifton
2020-09-22 11:42 ` Howard Chu
2020-09-22 13:12 ` Nick Clifton
2020-09-22 16:23 ` [PATCH] " Howard Chu
2020-09-22 17:16 ` Fangrui Song
2020-09-22 17:55 ` Howard Chu
2020-09-22 20:46 ` Howard Chu
2020-09-23 11:52 ` Nick Clifton
2020-09-23 15:29 ` Howard Chu
2020-09-24 5:21 ` Fangrui Song
2020-09-24 9:19 ` Howard Chu
2020-09-24 9:30 ` Howard Chu
2020-09-28 11:07 ` Howard Chu
2020-10-28 14:56 ` Howard Chu
2020-11-03 15:14 ` Nick Clifton
2020-11-03 15:31 ` Howard Chu
2020-11-08 1:39 ` Alan Modra
2020-11-08 15:07 ` Howard Chu [this message]
2020-11-09 0:01 ` Alan Modra
2020-11-10 2:44 ` Howard Chu
2020-11-10 11:07 ` Alan Modra
2020-11-11 14:57 ` Howard Chu
2020-11-11 14:59 ` Howard Chu
2020-11-17 14:01 ` Nick Clifton
2020-11-04 0:33 ` Howard Chu
2020-11-04 11:01 ` Nick Clifton
2020-11-04 14:50 ` Howard Chu
2020-11-06 12:38 ` Nick Clifton
2020-11-13 14:40 ` Howard Chu
2020-11-24 17:49 ` Howard Chu
2020-11-25 11:17 ` Nick Clifton
2020-12-01 0:08 ` Howard Chu
2020-12-14 14:28 ` Nick Clifton
2020-12-15 16:17 ` Jim Wilson
2020-12-15 16:22 ` Jeff Law
2020-12-15 16:50 ` Nick Clifton
2020-12-15 19:11 ` Jeff Law
2020-12-15 20:04 ` Jim Wilson
2020-12-15 20:22 ` Cary Coutant
2020-12-15 20:51 ` Howard Chu
2020-12-16 11:16 ` Nick Clifton
2020-12-16 14:49 ` [PATCH] ld: Call plugin hooks only if they are available H.J. Lu
2020-12-16 18:34 ` Howard Chu
2020-12-16 18:40 ` H.J. Lu
2020-12-16 19:06 ` Howard Chu
2020-12-16 19:11 ` [PATCH] ld: Skip libdep plugin if not all plugin hooks " H.J. Lu
2020-12-16 21:26 ` Howard Chu
2020-12-16 21:47 ` H.J. Lu
2020-12-16 18:44 ` [PATCH] ld: Call plugin hooks only if they " Howard Chu
2020-12-15 20:33 ` [PATCH] dependency list for static libraries Cary Coutant
2020-12-15 20:53 ` Howard Chu
2020-12-16 11:18 ` Nick Clifton
2020-12-23 13:27 ` Matthias Klose
2020-12-23 18:23 ` Howard Chu
2020-09-30 10:33 Peter Smith
2020-10-28 14:35 ` Howard Chu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63667fcd-8b9c-d416-3240-9712eeee4658@symas.com \
--to=hyc@symas.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).