]> git.droids-corp.org - dpdk.git/commitdiff
build: add libatomic dependency for 32-bit clang
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 28 May 2019 11:07:48 +0000 (12:07 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 3 Jun 2019 21:57:43 +0000 (23:57 +0200)
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>
Acked-by: Luca Boccassi <bluca@debian.org>
drivers/event/octeontx/meson.build
drivers/event/opdl/meson.build
lib/librte_rcu/meson.build

index 2b74bb62dea9d06e773ce598a70c7a07ae37298e..73118a485419739488de3ea7ce33ec86f744ed0a 100644 (file)
@@ -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
index cc6029c6f077b766ba87a0030e7cc52d44eb4857..1fe034ea12cc3d2a687a3656b8c2ada825cf7806 100644 (file)
@@ -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
index 0c2d5a2e083894b093692088c31d1850b72c740e..62920ba02cd1f58edd85d223244363137d617329 100644 (file)
@@ -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