Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does LOCAL_CFLAGS -mno-thumb means?

Tags:

android-ndk

I Know that LOCAL_CFLAGS are an optional set of compiler flags that will be passed when building C source files. My question is what this flags means "-mno-thumb" or where can i find a list of avaible LOCAL_CFLAGS and their menanings.

Thank you in advance!!

like image 726
Miguel Ángel Llorente Avatar asked Nov 30 '25 00:11

Miguel Ángel Llorente


1 Answers

The LOCAL_CFLAGS options are, in an Android.mk file, equivalent to the usual CFLAGS normally used with the compiler to specify compiling options.

There are tons of such options, the documentation for most of them can be found for example in the various links on this page from the GCC documentation.

As for the -mno-thumb option, it deactivates the Thumb optional instruction set available on most (recent) ARM processors. This instruction set is a limited, faster slower (EDIT: see answer by whobertoos) instruction set than the usual ARM instructions, so disabling it using this flag ensures a compatibility with more (mainly older) processors, but will probably cost you performance as a counterpart.

like image 66
mbrenon Avatar answered Dec 02 '25 12:12

mbrenon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!