libstdc++ in Libs.private?

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Aug 9 08:58:19 UTC 2016


Hello,

On Sun, 07 Aug 2016 16:01:27 +0200, Tollef Fog Heen wrote:

> > Is this the most appropriate solution? How is this situation of a C
> > application statically linked against a C++ library typically handled?  
> 
> I generally recommend avoid static linking and rather using $ORIGIN in
> rpath or similar solutions, but if you do absolutely want static
> linking, doing what you suggest seems ok, with the caveat that libstdc++
> might be magic in various ways which I'm not remembering right now.

In Buildroot, we support platforms where static linking is the *only*
solution: there is no support for shared libraries at all. This is the
case on several noMMU platforms, like ARM Cortex-M, m68k Coldfire, or
Blackfin when used with FLAT binaries.

We default to using shared libraries for most cases, but when those are
not supported on the selected architecture, we don't have any other
choice but to use static libraries. So this is a scenario that we test
in our automated build environment.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the pkg-config mailing list