numam-dpdk/buildtools
Thomas Monjalon af331158f2 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: 6affeabaf3 ("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-14 12:42:13 +01:00
..
pmdinfogen build: remove redundant config include 2020-02-11 16:50:59 +01:00
auto-config-h.sh buildtools: fix build for some mktemp 2018-10-27 15:30:25 +02:00
call-sphinx-build.py doc: rebuild with meson whenever a file changes 2020-01-15 08:50:28 +01:00
check-experimental-syms.sh buildtools: fix build with coverage 2019-11-26 09:04:36 +01:00
gen-build-mk.sh mk: allow renaming of build directories 2018-11-14 01:46:00 +01:00
gen-config-h.sh tools: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
gen-pmdinfo-cfile.sh buildtools: allow pedantic empty pmdinfo 2020-02-05 18:19:00 +01:00
list-dir-globs.py build: allow using wildcards to disable drivers 2020-02-06 09:17:24 +01:00
Makefile buildtools: change license to SPDX 2018-07-26 22:45:17 +02:00
map_to_def.py build: generate Windows exports file 2019-06-05 19:49:28 +02:00
map-list-symbol.sh buildtools: detect discrepancies for experimental symbols 2019-06-29 19:04:32 +02:00
meson.build net/mlx: workaround static linkage with meson 2020-02-14 12:42:13 +01:00
options-ibverbs-static.sh buildtools: get static mlx dependencies for meson 2020-02-14 12:42:13 +01:00
relpath.sh tools: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
symlink-drivers-solibs.sh build: fix ninja install on FreeBSD 2019-05-02 23:07:04 +02:00