From: Bruce Richardson Date: Tue, 28 May 2019 11:07:48 +0000 (+0100) Subject: build: add libatomic dependency for 32-bit clang X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c649f0b4f58e35730d773104d3ba93bf21e21505;p=dpdk.git build: add libatomic dependency for 32-bit clang 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 --- diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build index 2b74bb62de..73118a4854 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 cc6029c6f0..1fe034ea12 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 0c2d5a2e08..62920ba02c 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