Remove All Ads from XDA

[DEV] [GUIDE] [LINUX] Comprehensive Guide to Cross-Compiling

8,740 posts
Thanks Meter: 38,903
By JustArchi, Recognized Contributor / Recognized Developer on 19th April 2014, 03:35 AM
Post Reply Email Thread
21st December 2014, 12:31 PM |#21  
Senior Member
Thanks Meter: 5,595
Donate to Me
Thanks so much for this Archi. This method seems to create the most portable and yet dynamic binaries.

Maybe all those Linux developers can enter this space now

Could do with some portable binary packages at Botbrew.

BTW I've sometimes found the following handy:

OPTICFLAGS="-s -flto=8 -ffunction-sections -fdata-sections -fvisibility=hidden -funswitch-loops -frename-registers -frerun-cse-after-loop -fomit-frame-pointer -fgcse-after-reload -fgcse-sm -fgcse-las -fweb -ftracer -fstrict-aliasing -fpic -pie"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--relax -Wl,--sort-common -Wl,--gc-sections -llog"
and the

commmand alone magically does the entire job if there's a good in the source package.
26th February 2015, 09:29 PM |#22  
Thanks Meter: 8
Hi! Can you post your script somewhere else? Dropbox says the content is locked due to large number of requests.

You can create a Github Gist and post link.
27th February 2015, 11:20 PM |#23  
skulldreamz's Avatar
Senior Member
Flag Baltimore, MD
Thanks Meter: 1,177
Donate to Me
On page 2 he already did that
15th March 2016, 04:40 PM |#24  
zipperX's Avatar
Senior Member
Thanks Meter: 45
Hey i've tried but give me error
hello.c:1:19: fatal error: stdio.h: No such file or directory
any idea? I'm using ubertc with your script modified
27th July 2016, 07:26 PM |#25  
Thanks Meter: 17
Thanks for this useful script, works fine. i stuck in Step 3 compiling hello.c
bash: /root/ndkTC/bin/arm-linux-androideabi-gcc: cannot execute binary file: Exec format error
reinstalled android-ndk-r12b but same problem. the exact install syntax is
# build/tools/ --arch arm --api 18 --install-dir /root/ndkTC
i am running 32-bit OS Ubuntu Xenial 16.04 LTS on 64-bit AMD Athlon(tm) 64 3000+ machine
$ uname -mpi
i686 athlon i686
$ gcc -dumpmachine
25th October 2016, 10:42 AM |#26  
Junior Member
Thanks Meter: 1
Hi, can I compile a python wrapper module for Android with this ? Where I need to include the python path and python libs for the compiler ?
Tried to compile pylzma for android. Got error

/root/ndkTC/bin/../sysroot/usr/lib/crtbegin_dynamic.o:crtbrand.c:function _start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status

Here I paste LOG where you see what I 've done so far:
Post Reply Subscribe to Thread

justarchi cross compiler compiling guide
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes