Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Unwanted compilation parameters
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jérôme Baril  
View profile  
 More options Nov 9 2012, 10:33 am
From: Jérôme Baril <jerome.ba...@gmail.com>
Date: Fri, 9 Nov 2012 07:33:23 -0800 (PST)
Local: Fri, Nov 9 2012 10:33 am
Subject: Unwanted compilation parameters

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Turner  
View profile  
 More options Nov 12 2012, 8:42 am
From: David Turner <di...@android.com>
Date: Mon, 12 Nov 2012 14:42:36 +0100
Local: Mon, Nov 12 2012 8:42 am
Subject: Re: Unwanted compilation parameters

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »