01/07/2020 16:30, Thomas Monjalon:
> 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.richard...@intel.com>
> > Acked-by: Luca Boccassi <bl...@debian.org>
> > Acked-by: Sunil Pai G <sunil.pa...@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.

Even better:

> # For static linking with dependencies as shared libraries,
> # the internal static libraries must be flagged explicitly.



Reply via email to