From patchwork Tue May 28 11:07:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53731 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C3C61B998; Tue, 28 May 2019 13:08:19 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D0DB91B94E; Tue, 28 May 2019 13:08:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 04:08:15 -0700 X-ExtLoop1: 1 Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by orsmga007.jf.intel.com with ESMTP; 28 May 2019 04:08:13 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Shreyansh Jain , Alejandro Lucero , Anatoly Burakov , stable@dpdk.org, Maxime Coquelin , Zhihong Wang , Luca Boccassi , Zhang XuemingX , Bruce Richardson Date: Tue, 28 May 2019 12:07:48 +0100 Message-Id: <20190528110748.10772-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190528110748.10772-1-bruce.richardson@intel.com> References: <20190527161509.50252-1-bruce.richardson@intel.com> <20190528110748.10772-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile 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" When compiling with clang on 32-bit platforms, we are missing copies of 64-bit atomic functions. We can solve this by linking against libatomic for the drivers and libs which need those atomic ops. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- drivers/event/octeontx/meson.build | 5 +++++ drivers/event/opdl/meson.build | 5 +++++ lib/librte_rcu/meson.build | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build index 2b74bb6..3f83be6 100644 --- a/drivers/event/octeontx/meson.build +++ b/drivers/event/octeontx/meson.build @@ -11,3 +11,8 @@ 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/opdl/meson.build b/drivers/event/opdl/meson.build index cc6029c..e1cfb2d 100644 --- a/drivers/event/opdl/meson.build +++ b/drivers/event/opdl/meson.build @@ -9,3 +9,8 @@ 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/lib/librte_rcu/meson.build b/lib/librte_rcu/meson.build index 0c2d5a2..43edb87 100644 --- a/lib/librte_rcu/meson.build +++ b/lib/librte_rcu/meson.build @@ -5,3 +5,8 @@ allow_experimental_apis = true 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