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 <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
This commit is contained in:
Bruce Richardson 2019-05-28 12:07:48 +01:00 committed by Thomas Monjalon
parent be9d80d4df
commit c649f0b4f5
3 changed files with 15 additions and 0 deletions

View 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

View 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

View 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