DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] event/octeontx2: add libatomic dependency for 32-bit clang
@ 2019-07-04  8:59 pbhagavatula
  2019-07-04 14:49 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2019-07-04  8:59 UTC (permalink / raw)
  To: bruce.richardson, bluca, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.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: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/octeontx2/meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/event/octeontx2/meson.build b/drivers/event/octeontx2/meson.build
index bdb5beed6..ecd8fd84d 100644
--- a/drivers/event/octeontx2/meson.build
+++ b/drivers/event/octeontx2/meson.build
@@ -20,6 +20,11 @@ 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
-- 
2.22.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] event/octeontx2: add libatomic dependency for 32-bit clang
  2019-07-04  8:59 [dpdk-dev] [PATCH] event/octeontx2: add libatomic dependency for 32-bit clang pbhagavatula
@ 2019-07-04 14:49 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2019-07-04 14:49 UTC (permalink / raw)
  To: pbhagavatula; +Cc: dev, bruce.richardson, bluca, jerinj

04/07/2019 10:59, pbhagavatula@marvell.com:
> From: Pavan Nikhilesh <pbhagavatula@marvell.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: Pavan Nikhilesh <pbhagavatula@marvell.com>

Applied, thanks




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-04 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04  8:59 [dpdk-dev] [PATCH] event/octeontx2: add libatomic dependency for 32-bit clang pbhagavatula
2019-07-04 14:49 ` Thomas Monjalon

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).