build/pkg-config: improve static linking flags
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 30 Jun 2020 14:14:32 +0000 (15:14 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 1 Jul 2020 17:30:52 +0000 (19:30 +0200)
commit8549295db07b1f5777a314ee0b75f768e7ec4913
tree433f20d1edaee86124b3a2b270f4ec249428abfd
parentf9c0b1f4319ea4f40ee2ceb8097c9a5a34a56171
build/pkg-config: improve static linking flags

Rather than setting -Bstatic in the linker flags when doing a static link,
and then having to explicitly set -Bdynamic again afterwards, we can update
the pkg-config file to use -l:libfoo.a syntax to explicitly refer to the
static library in question. Since this syntax is not supported by meson's
pkg-config module directly, we can post-process the .pc files instead to
adjust them.

Once done, we can simplify the examples' makefiles and the docs by removing
the explicit static flag.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
45 files changed:
buildtools/pkg-config/meson.build
buildtools/pkg-config/set-static-linker-flags.py [new file with mode: 0644]
doc/guides/prog_guide/build-sdk-meson.rst
examples/bbdev_app/Makefile
examples/bond/Makefile
examples/cmdline/Makefile
examples/distributor/Makefile
examples/eventdev_pipeline/Makefile
examples/fips_validation/Makefile
examples/flow_classify/Makefile
examples/flow_filtering/Makefile
examples/helloworld/Makefile
examples/ioat/Makefile
examples/ip_fragmentation/Makefile
examples/ip_pipeline/Makefile
examples/ip_reassembly/Makefile
examples/ipsec-secgw/Makefile
examples/ipv4_multicast/Makefile
examples/kni/Makefile
examples/l2fwd-cat/Makefile
examples/l2fwd-crypto/Makefile
examples/l2fwd-event/Makefile
examples/l2fwd-jobstats/Makefile
examples/l2fwd-keepalive/Makefile
examples/l2fwd/Makefile
examples/l3fwd-acl/Makefile
examples/l3fwd-power/Makefile
examples/l3fwd/Makefile
examples/link_status_interrupt/Makefile
examples/ntb/Makefile
examples/packet_ordering/Makefile
examples/ptpclient/Makefile
examples/qos_meter/Makefile
examples/qos_sched/Makefile
examples/rxtx_callbacks/Makefile
examples/service_cores/Makefile
examples/skeleton/Makefile
examples/tep_termination/Makefile
examples/timer/Makefile
examples/vdpa/Makefile
examples/vhost/Makefile
examples/vhost_blk/Makefile
examples/vhost_crypto/Makefile
examples/vmdq/Makefile
examples/vmdq_dcb/Makefile