From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 75A3B1B9FB for ; Fri, 11 Jan 2019 19:16:25 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id r10so16178289wrs.10 for ; Fri, 11 Jan 2019 10:16:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=a40GROkxqnKa9xyBgssXE930SF/K5gL2KF9gC5bAsaw=; b=UvfOCUr3VJIJddRDVp8TIfTuuo0gRBJIwSyvYImu312DCPmjc/O8Amolejs13w72wh aqL/MVyV8vZOaWn4y5nncGLC9r4s+yhILVNGIWvNmD9Wfh9c8eDzD/BWQu3Qg4l+bIjW xgvagkDzNmOgUVqB31zgrU2smHfvVyUpeaGRFJ+s8LW3p3SAjHOXmZfC7KzBeSO2Sy9a u/dIfu4fgJY1F4DkziNLvrEakbMLQM6g2KSsmshNGM0LiUtLJhV8bF0HlWXHLDV9Xrkv TCOheNSs6UH7hZfsDPzMk0/nF1+rT8RXcqSYagn0ndJhvYMoC4s8t0B/gf+IJG/jT86T +fAw== X-Gm-Message-State: AJcUukcOYmIQOHITx+KAYY5Epb+sI5QDFVUV2uMIq5V/wwbmUBsvrY/G 2F1XmRR7ct8qpS2q0/BXzss= X-Google-Smtp-Source: ALg8bN4FoZzbZ3sf692VD8tdQHBGElkzcHnWFbFUQiBWaI2IqClYCTymcsGkdRitrBz2L8GsFAvaLA== X-Received: by 2002:a5d:4ccb:: with SMTP id c11mr15267374wrt.241.1547230584939; Fri, 11 Jan 2019 10:16:24 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id d4sm73960266wrp.89.2019.01.11.10.16.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 10:16:23 -0800 (PST) Message-ID: <1547230583.4501.21.camel@debian.org> From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org Date: Fri, 11 Jan 2019 18:16:23 +0000 In-Reply-To: <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> <20190111172118.GB16340@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 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 18:16:25 -0000 On Fri, 2019-01-11 at 17:21 +0000, Bruce Richardson wrote: > 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 >=20 > Spelling: superfluous I _always_ get that one wrong :-) > > take extra time, and avoid adding the linker flag manually which > > causes > > it to be duplicated. > >=20 > > Signed-off-by: Luca Boccassi > > --- > > v2: split libbsd change in a separate commit, remove CC to stable > > =C2=A0=C2=A0=C2=A0=C2=A0as a meson bump will be required > >=20 > > =C2=A0drivers/crypto/ccp/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 1 - > > =C2=A0drivers/crypto/openssl/meson.build | 1 - > > =C2=A0drivers/crypto/qat/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 1 - > > =C2=A0drivers/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 2 +- > > =C2=A0drivers/net/bnx2x/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= | 2 +- > > =C2=A0drivers/net/mlx4/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0| 6 +++--- > > =C2=A0drivers/net/mlx5/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0| 6 +++--- > > =C2=A0drivers/net/pcap/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0| 5 ++--- > > =C2=A0lib/librte_bpf/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0| 4 ++-- > > =C2=A0lib/librte_telemetry/meson.build=C2=A0=C2=A0=C2=A0| 2 +- > > =C2=A010 files changed, 13 insertions(+), 17 deletions(-) > >=20 > > 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 =3D files('rte_ccp_pmd.c', > > =C2=A0 'ccp_pmd_ops.c') > > =C2=A0 > > =C2=A0ext_deps +=3D dep > > -pkgconfig_extra_libs +=3D '-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 > > =C2=A0deps +=3D 'bus_vdev' > > =C2=A0sources =3D files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') > > =C2=A0ext_deps +=3D dep > > -pkgconfig_extra_libs +=3D '-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() > > =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0'qat_sym.c', > > =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0'qat_sym_session.c') > > =C2=A0 qat_ext_deps +=3D dep > > - pkgconfig_extra_libs +=3D '-lcrypto' > > =C2=A0 qat_cflags +=3D '-DBUILD_QAT_SYM' > > =C2=A0endif > > 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 > > =C2=A0 # set up internal deps. Drivers can > > append/override as necessary > > =C2=A0 deps =3D std_deps > > =C2=A0 # 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 > > =C2=A0 # probably also need to specify the "-l" flags in > > =C2=A0 # pkgconfig_extra_libs variable too, so that it > > can be reflected > > =C2=A0 # in the pkgconfig output for static builds >=20 > The last part of this comment can now be deleted, right? If we use > dependency() we don't need to use pkgconfig_extra_libs. >=20 > Is the pkgconfig_extra_libs variable still needed after these > changes? >=20 > /Bruce Yes, as we can't use dependency() for everything unfortunately - only for those projects that ship a pkg-config file, a cmake file or that Meson has built-in knowledge of (like llvm or libpcap). I'll update that comment accordingly in v4. --=20 Kind regards, Luca Boccassi