Pre-built GCC Cross-Compiler for Android: How to set the api level?

Jonathan Wakely jwakely.gcc@gmail.com
Wed Feb 21 14:15:00 GMT 2018


On 19 February 2018 at 20:24, Alexander Reiche wrote:
> Hi,
>
> i have installed Pre-built GNU toolchain via
> sudo apt-get install gcc-arm-linux-gnueabi
>
> the installed version now is:
> arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
>
> when cross compiling arm android with ndk, usually different toolchain has to be selected for each android version, depending on API level
> example
> API level  9 = 2.3.6 Gingerbread
> API level 19 = 4.4.2 KitKat
> API level 21 = 5.0.2 Lollipop
>
> Q: How to set/select the API level on GNU toolchain?
>
> could not find the answer in documentation
>
> you can answer directly here
> (or if no veto, i will post your answer)
> https://stackoverflow.com/questions/48348342

This stackoverflow question seems confused, is it asking about the ARM
processor, or the Android API? They are not the same thing.

The -march=armv7-a option has nothing to do with Gingerbread vs KitKat
vs Lollipop.



More information about the Gcc-help mailing list