From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0303FA045E for ; Mon, 27 May 2019 17:41:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A40DA49; Mon, 27 May 2019 17:41:26 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 97BA79E4 for ; Mon, 27 May 2019 17:41:25 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 08:41:24 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.64]) by fmsmga004.fm.intel.com with SMTP; 27 May 2019 08:41:22 -0700 Received: by (sSMTP sendmail emulation); Mon, 27 May 2019 16:41:21 +0100 Date: Mon, 27 May 2019 16:41:21 +0100 From: Bruce Richardson To: David Marchand Cc: "Ananyev, Konstantin" , Aaron Conole , dev Message-ID: <20190527154121.GA429@bricha3-MOBL.ger.corp.intel.com> References: <20190410134517.63896-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 0/2] remove use of weak functions from libraries X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, May 27, 2019 at 04:13:53PM +0200, David Marchand wrote: > Hello, > On Wed, Apr 10, 2019 at 3:45 PM Bruce Richardson > <[1]bruce.richardson@intel.com> wrote: > > Weak functions don't work well with static library builds as the > linker > always picks the first version of a function irrespective of whether > it is > weak or not. The solution to this is to use the "whole-archive" flag > when > linking, but this has the nasty side-effect that it causes the > resulting > binary to be larger than it needs to be. > A further problem with this approach of using "whole-archive" is > that one > either needs to link all libraries with this flag or track what > libraries > need it or not - the latter being especially a problem for apps not > using > the DPDK build system itself (i.e. most apps not shipped with DPDK > itself). > For meson builds this information needs to make its way all the way > through > to the pkgconfig file generated - not a trivial undertaking. > Thankfully, though, the use of weak functions is limited to use for > multiple functions within a single library, meaning that when the > lib is > being built, the build system itself can know whether the "weak" > function > is needed or not. This allows us to change the weak function to a > conditionally compiled regular function used in fallback case. This > makes > the need for "whole-archive" flag, and any special linking measures > for the > library, go away. > [This set does not touch the drivers, only the libraries, since > there are > other special linker flags needed for drivers in general, making the > problem less severe for driver .a files.] > > Was there something preventing this patchset from getting merged ? > -- > David Marchand > I believe Aaron Conole had some changes in the same area and was looking to roll these changes into a bigger patchset of his. Aaron, can you please confirm? /Bruce