arm-linux-androideabi-4.4.3 with "-mthumb-interwork"

243 views
Skip to first unread message

Brhett

unread,
Apr 27, 2012, 3:12:08 AM4/27/12
to android-ndk
Hi,

I am using ndkr5 for compiling native libraries for our application.
Some of the native libraries have to be compiled in ARM mode.

It looks like "thumb-interwork" is not enabled for arm-linux-
androideabi-4.4.3 by default while it would be enabled in arm-
eabi-4.4.0 in its setup.mk.

Here are two modules, A, B.
A has to be built in ARM mode and B is built in Thumb mode. B has call
to A.

I've tried to add "-mthumb-interwork" in TARGETthumb_relase_CFLAGS in
setup.mk for arm-linux-androideabi-4.4.3. But the new generated
library "B1" is the same with previous one "B0" without "-mthumb-
interwork".

Can anybody help me about it? Does arm-linux-androideabi-4.4.3 has
default setting of "-mthumb-interwork"?

Brhett Hu

unread,
May 6, 2012, 10:51:52 AM5/6/12
to android-ndk
Can anybody give me clarification about it?

TIA.


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


Carrot

unread,
May 7, 2012, 1:41:23 PM5/7/12
to andro...@googlegroups.com
Add -### to your compiler command line, then you can see the actual options to cc1 or cc1plus, look for -mthumb-interwork at that line.

thanks
Carrot
To unsubscribe from this group, send email to android-ndk+unsubscribe@googlegroups.com.

Brhett Hu

unread,
May 8, 2012, 12:35:36 AM5/8/12
to andro...@googlegroups.com
With "ndk-build V=1", "-mthumb-interwork" can not be found from the output.

...
Compile thumb  : avutil <= aes.c
/home/dong/work/ndkr5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /home/    dong/work/sources/ndk-projects/app_demo/obj/local/armeabi-v7a/objs-debug/foo.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/home/dong/work    /sources/ndk-projects/app_demo/jni/../jni/config_armneon_vfp/foo/  -DANDROID -O2 -finline-functions  -Wa,--noexecstack -g  -c  /home/dong/work/sources/ndk-projects/app_demo/jni/../../bar/foo.c -o /home/dong/work/sources/ndk-projects/app_demo/obj/local/armeabi-v7a/objs-debug/foo.o
...


Regards,
  Brhett

To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/IGawD89Vt6kJ.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.

Carrot

unread,
May 8, 2012, 12:28:39 PM5/8/12
to andro...@googlegroups.com


On Monday, May 7, 2012 9:35:36 PM UTC-7, Brhett wrote:
With "ndk-build V=1", "-mthumb-interwork" can not be found from the output.

...
Compile thumb  : avutil <= aes.c
/home/dong/work/ndkr5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /home/    dong/work/sources/ndk-projects/app_demo/obj/local/armeabi-v7a/objs-debug/foo.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/home/dong/work    /sources/ndk-projects/app_demo/jni/../jni/config_armneon_vfp/foo/  -DANDROID -O2 -finline-functions  -Wa,--noexecstack -g  -c  /home/dong/work/sources/ndk-projects/app_demo/jni/../../bar/foo.c -o /home/dong/work/sources/ndk-projects/app_demo/obj/local/armeabi-v7a/objs-debug/foo.o

I mean add -### to this line and look at the result.

Doug Kwan (關振德)

unread,
May 8, 2012, 2:12:07 PM5/8/12
to andro...@googlegroups.com
interwork in always used in EABI. There is no need to use
-mthumb-interwork in gcc.
> --
> 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.
Reply all
Reply to author
Forward
0 new messages