From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 293CD1B9F0 for ; Fri, 11 Jan 2019 18:21:22 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2019 09:21:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,466,1539673200"; d="scan'208";a="311071897" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.54]) by fmsmga005.fm.intel.com with SMTP; 11 Jan 2019 09:21:19 -0800 Received: by (sSMTP sendmail emulation); Fri, 11 Jan 2019 17:21:18 +0000 Date: Fri, 11 Jan 2019 17:21:18 +0000 From: Bruce Richardson To: Luca Boccassi Cc: dev@dpdk.org Message-ID: <20190111172118.GB16340@bricha3-MOBL.ger.corp.intel.com> References: <20190103175725.5836-1-bluca@debian.org> <20190111162608.13162-1-bluca@debian.org> <20190111162608.13162-2-bluca@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190111162608.13162-2-bluca@debian.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v3 2/4] build: use dependency() instead of find_library() 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: , X-List-Received-Date: Fri, 11 Jan 2019 17:21:22 -0000 On Fri, Jan 11, 2019 at 04:26:06PM +0000, Luca Boccassi wrote: > Whenever possible (if the library ships a pkg-config file) use meson's > dependency() function to look for it, as it will automatically add it > to the Requires.private list if needed, to allow for static builds to > succeed for reverse dependencies of DPDK. Otherwise the recursive > dependencies are not parsed, and users doing static builds have to > resolve them manually by themselves. > When using this API avoid additional checks that are superfluos and Spelling: superfluous > take extra time, and avoid adding the linker flag manually which causes > it to be duplicated. > > Signed-off-by: Luca Boccassi > --- > v2: split libbsd change in a separate commit, remove CC to stable > as a meson bump will be required > > drivers/crypto/ccp/meson.build | 1 - > drivers/crypto/openssl/meson.build | 1 - > drivers/crypto/qat/meson.build | 1 - > drivers/meson.build | 2 +- > drivers/net/bnx2x/meson.build | 2 +- > drivers/net/mlx4/meson.build | 6 +++--- > drivers/net/mlx5/meson.build | 6 +++--- > drivers/net/pcap/meson.build | 5 ++--- > lib/librte_bpf/meson.build | 4 ++-- > lib/librte_telemetry/meson.build | 2 +- > 10 files changed, 13 insertions(+), 17 deletions(-) > > diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build > index e43b00591..915c4c854 100644 > --- a/drivers/crypto/ccp/meson.build > +++ b/drivers/crypto/ccp/meson.build > @@ -18,4 +18,3 @@ sources = files('rte_ccp_pmd.c', > 'ccp_pmd_ops.c') > > ext_deps += dep > -pkgconfig_extra_libs += '-lcrypto' > diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build > index c2a0dd8ba..80e5e8835 100644 > --- a/drivers/crypto/openssl/meson.build > +++ b/drivers/crypto/openssl/meson.build > @@ -8,4 +8,3 @@ endif > deps += 'bus_vdev' > sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') > ext_deps += dep > -pkgconfig_extra_libs += '-lcrypto' > diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build > index 9cc98d2c2..21f969735 100644 > --- a/drivers/crypto/qat/meson.build > +++ b/drivers/crypto/qat/meson.build > @@ -13,6 +13,5 @@ if dep.found() > 'qat_sym.c', > 'qat_sym_session.c') > qat_ext_deps += dep > - pkgconfig_extra_libs += '-lcrypto' > qat_cflags += '-DBUILD_QAT_SYM' > endif > diff --git a/drivers/meson.build b/drivers/meson.build > index e37d4fe2b..d17ca76eb 100644 > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -46,7 +46,7 @@ foreach class:driver_classes > # set up internal deps. Drivers can append/override as necessary > deps = std_deps > # ext_deps: Stores external library dependency got > - # using dependency() or cc.find_library(). For most cases, we > + # using dependency() (preferred) or find_library(). For most cases, we > # probably also need to specify the "-l" flags in > # pkgconfig_extra_libs variable too, so that it can be reflected > # in the pkgconfig output for static builds The last part of this comment can now be deleted, right? If we use dependency() we don't need to use pkgconfig_extra_libs. Is the pkgconfig_extra_libs variable still needed after these changes? /Bruce