[osg-users] Android osgPlugins

Jan Ciger jan.ciger at gmail.com
Fri Aug 21 10:45:23 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20/08/15 21:42, Christian Kehl wrote:
> B) These local prebuilds are then referred to via 
> "LOCAL_WHOLE_STATIC_LIBRARIES", which is necessary so that the 
> ndk-build linker finds all referred functions. That's the actual 
> behaviour I kind'a expected in any case for a STATIC library 
> (containing all content), bust as Jan pointed out: Android NDK - 
> you'll never know what you get :D

AFAIK, normal (non "whole") static libs mean that the shared library
(or executable) generated from this library will have all
unused/unreferenced code removed. That is obviously a problem for a
library that is a dependency of something else - the GCC's linker will
throw away all "unused" code, because it has no idea it will be needed
in the future.

The LOCAL_WHOLE_STATIC_LIBRARIES turns this optimization off and
includes all code verbatim in the generated shared library/exe.

I believe it triggers the "--whole-archive" switch of the GNU linker.

J.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFV12Ozn11XseNj94gRAslfAKDQ/ePe2+DpRtyyxYJD4h9sqofFdwCeN2NJ
U2opm3y6Oc9snsyziIV0EyY=
=f0oi
-----END PGP SIGNATURE-----



More information about the osg-users mailing list