Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Building a cross compiler for Android
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
noprobXD
n00b
n00b


Joined: 23 Oct 2017
Posts: 4

PostPosted: Sat Oct 28, 2017 7:47 pm    Post subject: Building a cross compiler for Android Reply with quote

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!!!!! 8O *
Help will be much appreciated.
_________________
INSTALL GENTOO !
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 403
Location: San Diego, California USA

PostPosted: Tue Nov 28, 2017 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message
gorg86
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 79

PostPosted: Thu Nov 30, 2017 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum