View previous topic :: View next topic |
Author |
Message |
noprobXD n00b
Joined: 23 Oct 2017 Posts: 4
|
Posted: Sat Oct 28, 2017 7:47 pm Post subject: Building a cross compiler for Android |
|
|
Hello guys,
I want to build a cross-compiler (gcc 5.4.x) for my Asus Zenfone Z00D but apparently Android uses bionic libraries instead of glibc or uClibc and thus I have hit a wall.
Is there a workaround with uClibc (I have already tried but failed, gotta try again) or glibc? Does somebody know how to configure and install bionic into "include" (folder which contains kernel headers) because I do not know how to do it with crossdev *BECAUSE ANDROOOOOOOOOIIIIIID!!!!! *
Help will be much appreciated. _________________ INSTALL GENTOO ! |
|
Back to top |
|
|
gentoo_ram Guru
Joined: 25 Oct 2007 Posts: 474 Location: San Diego, California USA
|
Posted: Tue Nov 28, 2017 7:55 am Post subject: |
|
|
If you want to compile C or C++ for Android you should be using the android-ndk. That will include almost everything you need to compile native programs for Android. If you need more than that, then you can get the Android Open Source code. That will give you access to more libraries than you'll be able to get in the NDK if it doesn't have enough of what you're looking for. |
|
Back to top |
|
|
gorg86 Apprentice
Joined: 20 May 2011 Posts: 299
|
Posted: Thu Nov 30, 2017 7:34 pm Post subject: |
|
|
I agree, you should use the Android NDK to save yourself some headache
Btw. you might run into this error when executing your C/C++ program for the first time on Android:
Code: | Error: only position independent executables (PIE) are supported |
Use the parameter "-pie" with gcc/g++ |
|
Back to top |
|
|
|