The -g parameter is intended, and doesn't impact your final binaries, i.e.
it doesn't enlarge the size of the final binaries.
In a nutshell:
- intermediate libraries that are placed under obj/local/<abi>/ are built
with -g to contain debug symbols, even for optimized code.
- the final libraries that are put under lib/<abi>/, and which end up in
your .apk, are *stripped* from any debug symbols.
The point of the debug symbols under obj/local/<abi>/ is that it makes
tools like ndk-stack useful when you get a crash in your optimized code.
You can use ndk-stack to use the debug information under obj/local/<abi>/
to know exactly where the problem happened.
There is no impact on the size of the final stripped binaries, with our
without -g, so don't worry about it. And there is no way to disable this
right now.
Second, yes, gcc will only take the last one, to as long as it ends with
-mfpu=neon, you're good. You would probably won't be able to compile your
sources otherwise.
On Fri, Nov 9, 2012 at 4:33 PM, Jérôme Baril <jerome.ba
...@gmail.com> wrote:
> Hello,
> I try to compile tiny and optimized code using the lastest NDK.
> I use Neon instructions thus, the Android.mk file contains : LOCAL_ARM_NEON
> := true.
> Moreover, I don't need to debug my code (i.e. no debug symbols needed), so
> the Application.mk file contains : APP_OPTIM := release.
> Then, when I execute 'ndk-build -n' to see the compile commands, I found
> some misterious g++ options :
> - -g : to generate debug symbols
> - -march=armv7-a -mfloat-abi=softfp -mfpu=vfp [..] -mfpu=neon : 2 fpu
> options, AFAIK only the last one is needed in my case, but gcc maybe only
> takes the last one ?
> However, even if the fpu options are good (can you confirm ?), is there a
> way to drop the '-g' parameter. Indeed, this option enlarges the size of
> the lib with useless symbols.
> Thanks a lot !
> Jérôme
> --
> You received this message because you are subscribed to the Google Groups
> "android-ndk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-ndk/-/WZdOUUXJKEQJ.
> To post to this group, send email to android-ndk@googlegroups.com.
> To unsubscribe from this group, send email to
> android-ndk+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-ndk?hl=en.