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 05021A057B; Mon, 30 Mar 2020 15:17:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 895402BEA; Mon, 30 Mar 2020 15:17:30 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 6DD8FFFA for ; Mon, 30 Mar 2020 15:17:27 +0200 (CEST) IronPort-SDR: kN7lzor93p27fa+1pvpbCs89GdJvopdzZhDOgcHoWUzQOQftbZ3IUkyHQtgKahQNe4imYpezUm EXBI1whQk1rQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 06:17:27 -0700 IronPort-SDR: cJPjk9RVd1DbWlVxnXs47ku6pghTzN0302HiRi/fxPga1pkRpHSxCBY2y9M+NFmI4aVsmSNnj0 Uh64wWESFQPw== X-IronPort-AV: E=Sophos;i="5.72,324,1580803200"; d="scan'208";a="237349056" Received: from bricha3-mobl.ger.corp.intel.com ([10.214.232.198]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 30 Mar 2020 06:17:20 -0700 Date: Mon, 30 Mar 2020 14:17:15 +0100 From: Bruce Richardson To: jerinj@marvell.com Cc: Thomas Monjalon , Pavan Nikhilesh , Liang Ma , Peter Mccarthy , Marko Kovacevic , Ori Kam , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , Sunil Kumar Kori , David Hunt , Honnappa Nagarahalli , dev@dpdk.org, david.marchand@redhat.com, mattias.ronnblom@ericsson.com Message-ID: <20200330131715.GA132@bricha3-MOBL.ger.corp.intel.com> References: <20200325211603.240288-1-jerinj@marvell.com> <20200329144342.1543749-1-jerinj@marvell.com> <20200329144342.1543749-2-jerinj@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200329144342.1543749-2-jerinj@marvell.com> Subject: Re: [dpdk-dev] [PATCH v3 01/33] meson: add libatomic as a global dependency for i686 clang 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 Sun, Mar 29, 2020 at 08:13:10PM +0530, jerinj@marvell.com wrote: > From: Pavan Nikhilesh > > Add libatomic as a global dependency when compiling for 32-bit using > clang. As we need libatomic for 64-bit atomic ops. > > Cc: bruce.richardson@intel.com > Signed-off-by: Pavan Nikhilesh > --- > config/meson.build | 10 ++++++++++ > drivers/event/octeontx/meson.build | 5 ----- > drivers/event/octeontx2/meson.build | 5 ----- > drivers/event/opdl/meson.build | 5 ----- > examples/l2fwd-event/meson.build | 5 ----- > lib/librte_distributor/meson.build | 5 ----- > lib/librte_rcu/meson.build | 5 ----- > 7 files changed, 10 insertions(+), 30 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index abedd76f2..6e5530110 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -173,6 +173,16 @@ if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) > dpdk_extra_ldflags += '-lpcap' > endif > > + > +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops > +if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false > + atomic_dep = cc.find_library('atomic', required: true) > + if atomic_dep.found() > + add_project_link_arguments('-latomic', language: 'c') > + dpdk_extra_ldflags += '-latomic' > + endif > +endif > + Minor nit, you don't need to check for .found(), since the configure will fail if it's not found, since "required" is set to true. For cleanliness, you may also be able to use get_pkgconfig_variable() or get_configtool_variable() to get -latomic, rather than hard-coding it, though in this case I suspect hard-coding is fine. With the superfluous if removed Acked-by: Bruce Richardson