build: always link whole DPDK static libraries
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 30 Jun 2020 14:14:27 +0000 (15:14 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 1 Jul 2020 17:30:52 +0000 (19:30 +0200)
commite2db26f76673762532c0b830502bf37aee20d1a8
tree314d5e61e5ed2f341e8eb311fc6cc0dcde1576ec
parent949c97ae310af049075c8745208e8795b9071d9c
build: always link whole DPDK static libraries

To ensure all constructors are included in static build, we need to pass
the --whole-archive flag when linking, which is used with the
"link_whole" meson option. Since we use link_whole for all libs, we no
longer need to track the lib as part of the static dependency, just the
path to the headers for compiling.

After this patch is applied, all DPDK .a files are inside
--whole-archive/--no-whole-archive flags, but external dependencies and
shared libs being linked against remain outside.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
app/test/meson.build
drivers/meson.build
examples/meson.build
lib/meson.build