2017-12-18 15:56:25 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2019-04-02 03:54:58 +00:00
|
|
|
# Copyright(c) 2017-2019 Intel Corporation
|
|
|
|
|
net/mlx: workaround static linkage with meson
If ibverbs_link is static and the application choose to link DPDK
as static libraries, both PMD and ibverbs libraries must be linked
as static libraries. And the dependencies of ibverbs (netlink) must
still be linked as shared libraries.
Unfortunately, meson forget about the static requirement for ibverbs
when generating the .pc file.
As a result, libibverbs, libmlx4, libmlx5 are listed in Requires.private
section (allowing to be linked as shared libraries) and libnl is missing.
A fix is in progress for meson, but anyway we will have to live without
such a fix until a better version of meson is widely available:
https://github.com/mesonbuild/meson/pull/6393
In order to avoid meson suggesting shared libraries in the section
Requires.private of the .pc file, the dependency object is recreated
with declare_dependency():
- cflags are extracted the libibverbs.pc
- ldflags, from libibverbs.pc, are processed to force
static flavor of ibverbs libraries, thanks to this syntax:
-l:libfoo.a
Fixes: 6affeabaf321 ("net/mlx: add static ibverbs linkage with meson")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-12 22:07:06 +00:00
|
|
|
pkgconf = find_program('pkg-config', 'pkgconf', required: false)
|
2017-08-29 13:39:32 +00:00
|
|
|
pmdinfo = find_program('gen-pmdinfo-cfile.sh')
|
2020-01-27 14:28:22 +00:00
|
|
|
list_dir_globs = find_program('list-dir-globs.py')
|
2020-04-25 10:56:17 +00:00
|
|
|
check_symbols = find_program('check-symbols.sh')
|
net/mlx: workaround static linkage with meson
If ibverbs_link is static and the application choose to link DPDK
as static libraries, both PMD and ibverbs libraries must be linked
as static libraries. And the dependencies of ibverbs (netlink) must
still be linked as shared libraries.
Unfortunately, meson forget about the static requirement for ibverbs
when generating the .pc file.
As a result, libibverbs, libmlx4, libmlx5 are listed in Requires.private
section (allowing to be linked as shared libraries) and libnl is missing.
A fix is in progress for meson, but anyway we will have to live without
such a fix until a better version of meson is widely available:
https://github.com/mesonbuild/meson/pull/6393
In order to avoid meson suggesting shared libraries in the section
Requires.private of the .pc file, the dependency object is recreated
with declare_dependency():
- cflags are extracted the libibverbs.pc
- ldflags, from libibverbs.pc, are processed to force
static flavor of ibverbs libraries, thanks to this syntax:
-l:libfoo.a
Fixes: 6affeabaf321 ("net/mlx: add static ibverbs linkage with meson")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-12 22:07:06 +00:00
|
|
|
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
|
2020-07-04 11:48:01 +00:00
|
|
|
binutils_avx512_check = find_program('binutils-avx512-check.sh')
|
2019-10-08 14:36:27 +00:00
|
|
|
|
2020-06-29 12:37:41 +00:00
|
|
|
# set up map-to-win script using python, either built-in or external
|
2019-04-12 08:29:00 +00:00
|
|
|
python3 = import('python').find_installation(required: false)
|
|
|
|
if python3.found()
|
2020-01-10 21:52:04 +00:00
|
|
|
py3 = [python3]
|
2019-04-12 08:29:00 +00:00
|
|
|
else
|
2020-01-10 21:52:04 +00:00
|
|
|
py3 = ['meson', 'runpython']
|
2019-04-12 08:29:00 +00:00
|
|
|
endif
|
2020-06-29 12:37:41 +00:00
|
|
|
map_to_win_cmd = py3 + files('map_to_win.py')
|
2020-01-10 21:52:04 +00:00
|
|
|
sphinx_wrapper = py3 + files('call-sphinx-build.py')
|