[dpdk-dev] [PATCH v3 6/7] build/pkg-config: improve static linking flags
Thomas Monjalon
thomas at monjalon.net
Wed Jul 1 16:30:05 CEST 2020
30/06/2020 16:14, Bruce Richardson:
> 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 at intel.com>
> Acked-by: Luca Boccassi <bluca at debian.org>
> Acked-by: Sunil Pai G <sunil.pai.g at intel.com>
> ---
> --- a/buildtools/pkg-config/meson.build
> +++ b/buildtools/pkg-config/meson.build
> +# the pkg-config file generated is not best tuned for static linking so
> +# use a script to adjust the linker flags
> +run_command(py3, 'set-static-linker-flags.py', check: true)
The comment could be made more precise:
# For static linking with dependencies as shared libraries,
# the static libraries must be flagged explicitly.
For the rest,
Acked-by: Thomas Monjalon <thomas at monjalon.net>
More information about the dev
mailing list