af331158f2
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>
24 lines
820 B
Meson
24 lines
820 B
Meson
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright(c) 2017-2019 Intel Corporation
|
|
|
|
subdir('pmdinfogen')
|
|
|
|
pkgconf = find_program('pkg-config', 'pkgconf', required: false)
|
|
pmdinfo = find_program('gen-pmdinfo-cfile.sh')
|
|
list_dir_globs = find_program('list-dir-globs.py')
|
|
check_experimental_syms = find_program('check-experimental-syms.sh')
|
|
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
|
|
|
|
# set up map-to-def script using python, either built-in or external
|
|
python3 = import('python').find_installation(required: false)
|
|
if python3.found()
|
|
py3 = [python3]
|
|
else
|
|
py3 = ['meson', 'runpython']
|
|
endif
|
|
map_to_def_cmd = py3 + files('map_to_def.py')
|
|
sphinx_wrapper = py3 + files('call-sphinx-build.py')
|
|
|
|
# stable ABI always starts with "DPDK_"
|
|
is_experimental_cmd = [find_program('grep', 'findstr'), '^DPDK_']
|