<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 15 November 2013 21:14, Joakim <span dir="ltr"><<a href="mailto:joakim@airpost.net" target="_blank">joakim@airpost.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Friday, 15 November 2013 at 18:44:20 UTC, Iain Buclaw wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 15 November 2013 18:40, Joakim <<a href="mailto:joakim@airpost.net" target="_blank">joakim@airpost.net</a>> wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, I thought that would be easier, to split the effort into two parts.<br>
 First, get D working on Android/x86, then, linux/ARM.  Some fine day, we<br>
combine the two into Android/ARM. :)<br>
<br>
</blockquote></div><div class="im">
GNU/Linux on ARM will come first... it's now only a matter of time. ;)<br>
</div></blockquote>
<br>
Everything is "only a matter of time." ;) The order is not important; it'd be great if linux/ARM is done first, though I hope gdc isn't the only one that does it.<div class="im"><br>
<br>
On Friday, 15 November 2013 at 19:09:24 UTC, Johannes Pfau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There are 3 main points which need to be addressed for a solid Android<br>
port:<br>
<br>
* Druntime must be ported to bionic. Not difficult, but annoying as<br>
  bionic is a mixture between bsd and posix code, so you'll have to<br>
  edit many version statements. All compilers will benefit from that.<br>
</blockquote></div>
Yep, this is the part I'm taking a stab at.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* You need to implement TLS support. Last time I checked there bionic<br>
  didn't support native TLS and gcc's emulated TLS   doesn't work with<br>
  the D GC.<br>
</blockquote></div>
I think there's TLS support in bionic now, but not with the __thread keyword.  I'll look into it more as I go.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* The main program in Android should always be java code, native code<br>
  loaded as shared libraries. This is implemented in DMD now, but not<br>
  in GDC. (And IIRC not in LDC either?)<br>
</blockquote></div>
I just want to get it working as a pure native compilation option for now.  Perhaps someone else will tie D into JNI and get it working with Dalvik, I'm not interested in that.<br>
<br>

</blockquote></div><br></div><div class="gmail_extra">C++ (as in g++) has compiler support with JNI.  I've been turning the idea in my head as going down this route with D (gdc) support in the same way through some sort of magic module which generates these special types (jint, jclass, etc) - not too different from eg: gcc.builtins module.  But for the time being at least this is a deferred long-term wish list goal.<br>
</div><div class="gmail_extra"><br>-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';
</div></div>