30/06/2020 16:14, Bruce Richardson: > 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 <[email protected]> > Tested-by: Andrzej Ostruszka <[email protected]> > Acked-by: Luca Boccassi <[email protected]> > Acked-by: Sunil Pai G <[email protected]> > --- > --- a/app/test/meson.build > +++ b/app/test/meson.build > - link_libs = dpdk_drivers > + link_libs = dpdk_static_libraries + dpdk_drivers > link_nodes = dpdk_graph_nodes [...] > --- a/examples/meson.build > +++ b/examples/meson.build > -driver_libs = [] > +link_whole_libs = [] > node_libs = [] > if get_option('default_library') == 'static' > - driver_libs = dpdk_drivers > + link_whole_libs = dpdk_static_libraries + dpdk_drivers > node_libs = dpdk_graph_nodes
I think the special case for librte_node may be removed. I will propose a separate patch for this case. Acked-by: Thomas Monjalon <[email protected]>

