[dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile
Luca Boccassi
bluca at debian.org
Tue May 28 13:46:33 CEST 2019
On Tue, 2019-05-28 at 12:07 +0100, Bruce Richardson wrote:
> 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 at intel.com
> >
> ---
> drivers/event/octeontx/meson.build | 5 +++++
> drivers/event/opdl/meson.build | 5 +++++
> lib/librte_rcu/meson.build | 5 +++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/event/octeontx/meson.build
> b/drivers/event/octeontx/meson.build
> index 2b74bb6..3f83be6 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 cc6029c..e1cfb2d 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 0c2d5a2..43edb87 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
Acked-by: Luca Boccassi <bluca at debian.org>
--
Kind regards,
Luca Boccassi
More information about the dev
mailing list