This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Pre-built GCC Cross-Compiler for Android: How to set the api level?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Alexander Reiche <alecxs at gmx dot de>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 20 Feb 2018 11:27:13 +0000
- Subject: Re: Pre-built GCC Cross-Compiler for Android: How to set the api level?
- Authentication-results: sourceware.org; auth=none
- References: <trinity-36163eae-61a0-450f-8679-68b5c167f687-1519071871371@3c-app-gmx-bs28>
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.