Probably you can run a D command line app on an android ARM device

Johannes Pfau via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 13 11:30:15 PDT 2015


Am Mon, 13 Apr 2015 17:44:41 +0000
schrieb "Laeeth Isharc" <Laeeth.nospam at nospam-laeeth.com>:

> On Monday, 13 April 2015 at 16:33:06 UTC, Joakim wrote:
> > On Sunday, 12 April 2015 at 19:03:33 UTC, Laeeth Isharc wrote:
> >> BTW - since we have linux on ARM, the following may be useful 
> >> if you wish to run a D application on your Android mobile 
> >> device.  No ADB or root required.
> >>
> >> http://kevinboone.net/android_nonroot.html
> >
> > I stumbled across that site sometime back when looking for a 
> > way to open a shell with my own command-line apps on my Android 
> > tablet and run the druntime/phobos unit tests from the command 
> > line on an unrooted Android/ARM device.  However, that setup is 
> > not going to fix the TLS issue that's holding up Android/ARM.  
> > D sticks all non-shared/__gshared globals in Thread-Local 
> > Storage (TLS) by default, but Android doesn't support TLS 
> > natively, so you can't just compile a D app for linux/ARM and 
> > run it on Android/ARM, whether with that setup or not.
> 
> So that is why vibed demo app doesn't work although it does 
> compile.   (The TLS kludge not yet in GDC).  So if I make all 
> globall gshared, I can do useful work today using Gdc on arm 
> android, even if I have to use an alternative to vibed for the 
> network stuff ?
> 

I didn't read all of this discussion. Does the chroot method mean you
can use glibc? Anyway, I recently pushed GC support for GCC emulated
TLS to GDC which should work just fine on bionic or glibc. However, the
GC doesn't work with bionic because of other issues.

So your best bet is to build an ARM GDC-compiler with --disable-tls.
This way you at least get emulated TLS which should work.


More information about the Digitalmars-d mailing list