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

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 13 19:55:19 PDT 2015


On Monday, 13 April 2015 at 18:30:16 UTC, Johannes Pfau wrote:
> 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?

Yes - I think so.  Otherwise I presume the standard ARM arch 
distribution (which is running on my phone under the open source 
project "Linux Deploy" wouldn't work.  I don't know what dark 
magic, if any, is done to make this project function more 
generally.

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.

Thank you for this.  I will give it a try.




More information about the Digitalmars-d mailing list