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 DCF4CA0562; Fri, 3 Apr 2020 17:37:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E29981C0C2; Fri, 3 Apr 2020 17:37:09 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 6AE151C0C2 for ; Fri, 3 Apr 2020 17:37:08 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 033Faco6029268; Fri, 3 Apr 2020 08:37:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=t/hYBwlyqatsE7Idxddk5rwwUtCeIwo3U69xGvQrLqA=; b=tPCvPf5InA5kJrJLQ9SFVP+TNvf5G5Lvtc8Hcs1D9qIkz0nTddjGy7kwO/Wu4Dl3nvY5 +BhfP2Vzj4zAq49DMUE0o1Lhn52U1TFMw9R9vXASVibcSmfd8KioFyv2Mh/hxZeVmYcX wHMQ4rXsTZuufDHIzjh4ZppeuCF9P4/kK3gO0FOtMROQpKXAWB3POf6qIQrhJUi8ie+P Ok96FNlJatlIa/B4naIDBO367jVAyF1Vxz0keePEvNTnrXJDYmPRl4fe04cZ+FSaTQAm lE7/MHrNgr1+usF0AFVJC2mzt1snJ5tVqRWhnS3bYXZ4TFvfJ9/TTpllQUGvUgFspSEv jg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 304855y7ay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 03 Apr 2020 08:37:05 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Apr 2020 08:37:03 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Apr 2020 08:37:03 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Apr 2020 08:37:02 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id E0CB73F703F; Fri, 3 Apr 2020 08:36:57 -0700 (PDT) From: To: Thomas Monjalon , Jerin Jacob , Pavan Nikhilesh , Liang Ma , Peter Mccarthy , Marko Kovacevic , Ori Kam , Bruce Richardson , Radu Nicolau , "Akhil Goyal" , Tomasz Kantecki , Sunil Kumar Kori , David Hunt , Honnappa Nagarahalli CC: , , Date: Fri, 3 Apr 2020 21:06:37 +0530 Message-ID: <20200403153709.3703448-2-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403153709.3703448-1-jerinj@marvell.com> References: <20200329144342.1543749-1-jerinj@marvell.com> <20200403153709.3703448-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-03_11:2020-04-03, 2020-04-03 signatures=0 Subject: [dpdk-dev] [PATCH v4 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" 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 Acked-by: Bruce Richardson --- config/meson.build | 8 ++++++++ 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, 8 insertions(+), 30 deletions(-) diff --git a/config/meson.build b/config/meson.build index 58421342b..8a4c692a9 100644 --- a/config/meson.build +++ b/config/meson.build @@ -173,6 +173,14 @@ 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) + add_project_link_arguments('-latomic', language: 'c') + dpdk_extra_ldflags += '-latomic' +endif + # add -include rte_config to cflags add_project_arguments('-include', 'rte_config.h', language: 'c') diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build index 73118a485..2b74bb62d 100644 --- a/drivers/event/octeontx/meson.build +++ b/drivers/event/octeontx/meson.build @@ -11,8 +11,3 @@ sources = files('ssovf_worker.c', ) deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev', 'pmd_octeontx'] - -# 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 - ext_deps += cc.find_library('atomic') -endif diff --git a/drivers/event/octeontx2/meson.build b/drivers/event/octeontx2/meson.build index 4b938416b..0ade51cec 100644 --- a/drivers/event/octeontx2/meson.build +++ b/drivers/event/octeontx2/meson.build @@ -18,11 +18,6 @@ if not dpdk_conf.get('RTE_ARCH_64') extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast'] 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 - ext_deps += cc.find_library('atomic') -endif - foreach flag: extra_flags if cc.has_argument(flag) cflags += flag diff --git a/drivers/event/opdl/meson.build b/drivers/event/opdl/meson.build index 1fe034ea1..cc6029c6f 100644 --- a/drivers/event/opdl/meson.build +++ b/drivers/event/opdl/meson.build @@ -9,8 +9,3 @@ sources = files( 'opdl_test.c', ) deps += ['bus_vdev'] - -# 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 - ext_deps += cc.find_library('atomic') -endif diff --git a/examples/l2fwd-event/meson.build b/examples/l2fwd-event/meson.build index c4664c3a3..4e9a069d6 100644 --- a/examples/l2fwd-event/meson.build +++ b/examples/l2fwd-event/meson.build @@ -16,8 +16,3 @@ sources = files( 'l2fwd_event_internal_port.c', 'l2fwd_event_generic.c' ) - -# 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 - ext_deps += cc.find_library('atomic') -endif diff --git a/lib/librte_distributor/meson.build b/lib/librte_distributor/meson.build index 266af6434..bd12ddb2f 100644 --- a/lib/librte_distributor/meson.build +++ b/lib/librte_distributor/meson.build @@ -9,8 +9,3 @@ else endif headers = files('rte_distributor.h') deps += ['mbuf'] - -# 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 - ext_deps += cc.find_library('atomic') -endif diff --git a/lib/librte_rcu/meson.build b/lib/librte_rcu/meson.build index 5929bd3a7..c009ae4b7 100644 --- a/lib/librte_rcu/meson.build +++ b/lib/librte_rcu/meson.build @@ -3,8 +3,3 @@ sources = files('rte_rcu_qsbr.c') headers = files('rte_rcu_qsbr.h') - -# 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 - ext_deps += cc.find_library('atomic') -endif -- 2.25.1