From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Shreyansh Jain <shreyansh.jain@nxp.com>,
Alejandro Lucero <alejandro.lucero@netronome.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
stable@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
Zhihong Wang <zhihong.wang@intel.com>,
Luca Boccassi <bluca@debian.org>,
Zhang XuemingX <xuemingx.zhang@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile
Date: Tue, 28 May 2019 12:07:48 +0100 [thread overview]
Message-ID: <20190528110748.10772-6-bruce.richardson@intel.com> (raw)
In-Reply-To: <20190528110748.10772-1-bruce.richardson@intel.com>
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 <bruce.richardson@intel.com>
---
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
--
2.7.4
next prev parent reply other threads:[~2019-05-28 11:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 16:15 [dpdk-dev] [PATCH 0/3] fix 32-bit meson builds Bruce Richardson
2019-05-27 16:15 ` [dpdk-dev] [PATCH 1/3] net/nfp: disable nfp for " Bruce Richardson
2019-05-27 16:15 ` [dpdk-dev] [PATCH 2/3] build: enable large file support on 32-bit Bruce Richardson
2019-05-27 16:15 ` [dpdk-dev] [PATCH 3/3] build: remove unnecessary large file support defines Bruce Richardson
2019-05-28 9:46 ` [dpdk-dev] [PATCH 0/3] fix 32-bit meson builds Luca Boccassi
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 1/5] net/nfp: disable nfp for " Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit Bruce Richardson
2019-05-30 6:45 ` Shreyansh Jain
2019-06-04 14:49 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 3/5] build: remove unnecessary large file support defines Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 4/5] eal: mark unused function in 32-bit builds Bruce Richardson
2019-05-28 11:46 ` Luca Boccassi
2019-05-28 11:07 ` Bruce Richardson [this message]
2019-05-28 11:46 ` [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile Luca Boccassi
2019-06-03 22:00 ` [dpdk-dev] [PATCH v2 0/5] fix 32-bit meson builds Thomas Monjalon
2019-10-02 15:11 ` Kevin Traynor
2019-10-03 8:28 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190528110748.10772-6-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=alejandro.lucero@netronome.com \
--cc=anatoly.burakov@intel.com \
--cc=bluca@debian.org \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=shreyansh.jain@nxp.com \
--cc=stable@dpdk.org \
--cc=xuemingx.zhang@intel.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).