When I try to set APP_CFLAGS := -marm -mcpu=cortex-a9, I see that this
extra flag gets appended to the other CFLAGS.
I want to override as the default flags conflict with the flags that I
am passing and also make it difficult to see which flag is really
getting enabled if there are two of them of the same kind. For
example, with the flag above I see the following warning:
warning: switch -mcpu=cortex-a9 conflicts with -march= switch
because -march=armv5te is prepended to the APP_CLFAGS.
Please suggest how I can override the APP_CLFAGS.
Thanks,
Divkis
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
> Just use a -march=<something> in your APP_CFLAGS to override the default.
Well that doesn't solve my problem. From what it appears arm-gcc
shipped with NDK expects either of cpu or architecture to be defined
but not both. I would want to define other flags as well like -mfloat-
abi, optimization level etc.
Having multiple -march / -mcpu options in the build command looks ugly
and confusing even though probably the ones defined later would
override. For example having -march=armv5te -march=armv7
simultaneously in build command would probably build for the v7
architecture but can be confusing.
> But frankly, your code will not work on many devices out there, you should
> not be doing this !
I am targeting only a specific device, and do not intend my code to
run on all possible Android platforms.
Thanks a lot for your immediate response,
Regards,
Divkis
Divkis
On Apr 10, 1:01 am, David Turner <di...@android.com> wrote:
> In this case, you will have to override TARGET_ARCH_CFLAGS. look for the
> current definition in build/platforms/toolchains/arm-eabi-4.4.0/setup.mk
>
That does work but when I pass the flags from command line like this:
make -j2 APP=myapp V=1 APP_OPTIM=debug TARGET_ARCH_CFLAGS="-
mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16"
Isn't there a way to override by specifying it in either
Application.mk or Android.mk?
Thanks again,
Regards,
Divkis
Regards,
Divkis