From cea66312b4648326153a456f510fed399b5044df Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Thu, 4 Jul 2019 14:29:35 +0530 Subject: [PATCH] event/octeontx2: 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. Fixes: f0b9982cb3a7 ("event/octeontx2: add TIM bucket operations") Signed-off-by: Pavan Nikhilesh --- 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 bdb5beed69..ecd8fd84d9 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.20.1