< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Large shared object files for Android build?


I'm still deep in trying to get this figured out, but I noticed the default compiler flags (-g -O2) are not optimized for size, and adding this to the top of the android-custom-ndk script makes a significant reduction in size:

export CXXFLAGS="-Os”



On Mon Jun  2 14:49:43 2014, Brien Colwell wrote:
Hi,

I'm using the script at build/android-custom-ndk to build shared
object files for Android. This successfully builds files to
~/ndk-prebuilt after setting up openssl-android and building it for
the target architectures (armeabi, armeabi-v7, x86). However, I'm
seeing some large shared object files:

libresip-1.9.so 20MB
libdum-1.9.so 19MB
librutil-1.9.so 4.8MB
libresipares-1.9.so 160KB

I'd hope that each shared object file would be small for an Android
package. Has anyone investigated the cause of the size? I'm at a loss
digging around with nm. For reference, the Android libs seem to be 4x
larger than the libs build with this config:

./configure --with-ssl --with-mysql --with-c-ares
CXXFLAGS="-DRESIP_FIXED_POINT"

libresip-1.9.so 5.7MB
libdum-1.9.so 3.6MB
librutil-1.9.so 1.7MB


Best,
Brien