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
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