From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zmcc-2-mx.zmailcloud.com (zmcc-2-mx.zmailcloud.com [52.37.197.7]) by sourceware.org (Postfix) with ESMTPS id A94BF385481D for ; Sun, 8 Nov 2020 15:07:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A94BF385481D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=symas.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hyc@symas.com Received: from zmcc-2.zmailcloud.com (zmcc-2-mta-1.zmailcloud.com [146.148.52.56]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zmcc-2-mx.zmailcloud.com (Postfix) with ESMTPS id 9A2B94050E; Sun, 8 Nov 2020 09:07:32 -0600 (CST) Received: from zmcc-2.zmailcloud.com (localhost [127.0.0.1]) by zmcc-2-mta-1.zmailcloud.com (Postfix) with ESMTPS id 14573CE37A; Sun, 8 Nov 2020 09:07:32 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by zmcc-2-mta-1.zmailcloud.com (Postfix) with ESMTP id F0E81CE2E6; Sun, 8 Nov 2020 09:07:31 -0600 (CST) DKIM-Filter: OpenDKIM Filter v2.10.3 zmcc-2-mta-1.zmailcloud.com F0E81CE2E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=symas.com; s=37C7994C-28CA-11EA-A30F-68F90BB9D764; t=1604848052; bh=16yj11VKw0sFI2FwLPfpNIydWB/NyTnCqBCtEBUiPiw=; h=To:From:Message-ID:Date:MIME-Version; b=g1XpQXhuIQ7mM01W076gFVBmbMci9XaWSy8ItGkJ2P2R1R7G0m2ytZFG8SxgpblL0 w5hG3qIuBCwwnlIZapqqNXfvpNMkqqbK8CbV8vcX1uGxUwHTvF0Gvd9RJV9/oI1bNj w24n7urdpldkVjnVgT6F+ox1ckBIs2S3RcWONTtSMdEVryBN8/e4QDyN/ZFvL4CRHg ukbpEQ8KOwys0ChARR9HoxhMiIfIIjL9txUa+m08kSQL8vNyTQlyl3Ch0qDB47vjnT DhRCl+0+Y1KQQv/nA28xBGqa3wkPQok4XGZDzPmmYMFEY/2EXPBr89IK/th1buxcGi FmA5SqiH7r1pA== Received: from zmcc-2.zmailcloud.com ([127.0.0.1]) by localhost (zmcc-2-mta-1.zmailcloud.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id npIIRi_iA-La; Sun, 8 Nov 2020 09:07:31 -0600 (CST) Received: from [192.168.1.155] (unknown [84.203.30.144]) by zmcc-2-mta-1.zmailcloud.com (Postfix) with ESMTPSA id 4C18CCE351; Sun, 8 Nov 2020 09:07:31 -0600 (CST) Subject: Re: [PATCH] dependency list for static libraries To: Alan Modra Cc: binutils@sourceware.org References: <9889c54b-4dd3-2275-6621-c2391cfd268d@redhat.com> <31f9062e-175d-06e9-695a-797c7ee11420@symas.com> <58620dc1-3bb9-aaae-b476-ebb613ecb627@redhat.com> <1aaf4429-074c-7912-e6e6-4d2f82d6ef10@redhat.com> <6d270cf5-4011-d916-3e5f-140bc506f807@symas.com> <20201108013911.GB15956@bubble.grove.modra.org> From: Howard Chu Message-ID: <63667fcd-8b9c-d416-3240-9712eeee4658@symas.com> Date: Sun, 8 Nov 2020 15:07:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.3 MIME-Version: 1.0 In-Reply-To: <20201108013911.GB15956@bubble.grove.modra.org> Content-Type: multipart/mixed; boundary="------------39580B9AA3266E6D4CECCA60" X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_RED autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2020 15:07:36 -0000 This is a multi-part message in MIME format. --------------39580B9AA3266E6D4CECCA60 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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/ --------------39580B9AA3266E6D4CECCA60 Content-Type: text/x-patch; name="0001-ar-fix-libdeps-to-avoid-unnecessary-dependency-on-pl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-ar-fix-libdeps-to-avoid-unnecessary-dependency-on-pl.pa"; filename*1="tch" >From 4d2982a8c62b09a16ba1e9c4913c262f11557017 Mon Sep 17 00:00:00 2001 From: Howard Chu 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 --------------39580B9AA3266E6D4CECCA60--