From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A1F9A0350; Wed, 1 Jul 2020 16:36:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E46831D163; Wed, 1 Jul 2020 16:36:24 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 565EF1D160 for ; Wed, 1 Jul 2020 16:36:22 +0200 (CEST) IronPort-SDR: vSKe635SKSkGXjVd0aU3ynchJEhkOzZF4v/O6TsJu7GdkqPqo59or8E0PGxUDHNDfW4Gdx/Cpq k05aCsVBaPKg== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="211645180" X-IronPort-AV: E=Sophos;i="5.75,300,1589266800"; d="scan'208";a="211645180" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 07:36:13 -0700 IronPort-SDR: D8ugjvd6bW2rkpFzIMc6yiKtLmEo6xlos7l5Yz1jKjEbmUmA+nwxoV6QgXHJOmNgvWNoXhpjfJ 1C19vA2lBQ9w== X-IronPort-AV: E=Sophos;i="5.75,300,1589266800"; d="scan'208";a="481620769" Received: from bricha3-mobl.ger.corp.intel.com ([10.251.80.77]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 01 Jul 2020 07:36:08 -0700 Date: Wed, 1 Jul 2020 15:36:05 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com, ktraynor@redhat.com, bluca@debian.org, sunil.pai.g@intel.com Message-ID: <20200701143605.GF595@bricha3-MOBL.ger.corp.intel.com> References: <20200429100831.398-1-bruce.richardson@intel.com> <20200630141433.818517-7-bruce.richardson@intel.com> <12416796.FDjNEWGfuk@thomas> <2333495.2VkqQosWx8@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2333495.2VkqQosWx8@thomas> Subject: Re: [dpdk-dev] [PATCH v3 6/7] build/pkg-config: improve static linking flags 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 Wed, Jul 01, 2020 at 04:33:27PM +0200, Thomas Monjalon wrote: > 01/07/2020 16:30, Thomas Monjalon: > > 30/06/2020 16:14, Bruce Richardson: > > > Rather than setting -Bstatic in the linker flags when doing a static link, > > > and then having to explicitly set -Bdynamic again afterwards, we can update > > > the pkg-config file to use -l:libfoo.a syntax to explicitly refer to the > > > static library in question. Since this syntax is not supported by meson's > > > pkg-config module directly, we can post-process the .pc files instead to > > > adjust them. > > > > > > Once done, we can simplify the examples' makefiles and the docs by removing > > > the explicit static flag. > > > > > > Signed-off-by: Bruce Richardson > > > Acked-by: Luca Boccassi > > > Acked-by: Sunil Pai G > > > --- > > > --- a/buildtools/pkg-config/meson.build > > > +++ b/buildtools/pkg-config/meson.build > > > +# the pkg-config file generated is not best tuned for static linking so > > > +# use a script to adjust the linker flags > > > +run_command(py3, 'set-static-linker-flags.py', check: true) > > > > The comment could be made more precise: > > # For static linking with dependencies as shared libraries, > > # the static libraries must be flagged explicitly. > > Even better: > > > # For static linking with dependencies as shared libraries, > > # the internal static libraries must be flagged explicitly. > Should "dependencies" be clarified as "external" or "non-DPDK" dependencies? /Bruce