From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id C84F1A0350;
	Wed,  1 Jul 2020 16:45:25 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 428451D41A;
	Wed,  1 Jul 2020 16:45:25 +0200 (CEST)
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com
 [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id E24C21D416
 for <dev@dpdk.org>; Wed,  1 Jul 2020 16:45:23 +0200 (CEST)
Received: from compute7.internal (compute7.nyi.internal [10.202.2.47])
 by mailout.west.internal (Postfix) with ESMTP id 7E96C9D2;
 Wed,  1 Jul 2020 10:45:22 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute7.internal (MEProxy); Wed, 01 Jul 2020 10:45:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm1; bh=
 98H4nj+lTmdas4aPqlQ2M1ckKKdgeLYjyNMTWIitgGI=; b=Xh7K48iSgLO3CFqj
 VicoUMB1oW91W0LflpLpLhoPL1FSTCcMNyuY5tCtydpBcs57tpWQoreap63GSHg5
 IGOJAZT+f2He67hUwVy4MwU0XB7u1lOgqVDzrCMr8YThCE52+ApHGO53xpoomDtN
 KQDyGkV0EZqFOsSwwSEu4iE95XjEA3xQUjCcAlYDLyBRPaKVuOh9v+zmO8ASPNhX
 ghvhKPrbOwTt4ORn5jasTRZQu2LfNlWeFPUO1j+UIwR8ekLFnpcxvdS9KZX0aEv5
 mnBsySDgOoI1SKUcm0ZKhvJXKyK/CtnnNYzFyf7jNcexQ3VoqTZlF/h65t82uMC/
 D7TZNg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; bh=98H4nj+lTmdas4aPqlQ2M1ckKKdgeLYjyNMTWIitg
 GI=; b=bV+aBCpcL3UTTO7ay719wiz0eReb056Xh/9JYFx/R/uMLojN2leNSnpu9
 UPYwP4CPr89LKNVXBvdSUGPGOPnkwm+86h4VGRbYA17Z3dGmAbTsv8QJ2Bz1TiH+
 xBqATy6hi+AdJZubhrmvZvKyjWdzIZ9FSXDTY3jsMs/M5VdVatetT9WJQ+B6ScbK
 5vuuCfNm2F9WZE2eg0UslR7B1Ql6bH3QqPnDXS20IdtIhF4uVtkbFb3hNgrRs/JL
 YqpvHRpCmxZnswP0Od5MzNf0uSUs2jSB7nYI85fjLpyfilOOojtcwddtne0jzZCR
 QKHwDtBgHboAhOMFHyKrcr08zFIfw==
X-ME-Sender: <xms:gqH8XqAGA2UiOiR0pBFRJzf4czY2OlXG5nRuWf9G5ETaasDRFMsbng>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtddvgdekudcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf
 frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei
 iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih
 iivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho
 nhdrnhgvth
X-ME-Proxy: <xmx:gqH8Xkius90MkrBTtP-mHP1DZIbiH6Mp_HOpRbA59lvdBWR29dpKpg>
 <xmx:gqH8Xtk81uXW3CogZ04r3Jjp4AoiK8pI56diMaeXxVG6QV1ac3foCg>
 <xmx:gqH8XoxK0uFU8qr2neKW9dtEk0HVgWDFMQm8O__-e7ahe2pyYK47LQ>
 <xmx:gqH8Xqchvn2MpAdGuk4EQedmWh3sxbScOwcXyJV44qRiZ6wNFW_1QQ>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 4B6923280065;
 Wed,  1 Jul 2020 10:45:21 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, david.marchand@redhat.com, ktraynor@redhat.com,
 bluca@debian.org, sunil.pai.g@intel.com
Date: Wed, 01 Jul 2020 16:45:20 +0200
Message-ID: <3734634.1lGQLMSA0O@thomas>
In-Reply-To: <20200701143605.GF595@bricha3-MOBL.ger.corp.intel.com>
References: <20200429100831.398-1-bruce.richardson@intel.com>
 <2333495.2VkqQosWx8@thomas>
 <20200701143605.GF595@bricha3-MOBL.ger.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

01/07/2020 16:36, Bruce Richardson:
> 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 <bruce.richardson@intel.com>
> > > > Acked-by: Luca Boccassi <bluca@debian.org>
> > > > Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
> > > > ---
> > > > --- 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?

Yes:

# For static linking with external dependencies as shared libraries,
# the internal static libraries must be flagged explicitly.