wow, great news for my phone :)<br>I've read another blogpost about someone trying to achieve the same, had something to do with "between ideals", I'll google it up if you need it.<br>he had a github repo with some "ugly hacks" to make druntime work for android, maybe this can be looked into?<br>
<br><div class="gmail_quote">2012/2/5 Alex Rønne Petersen <span dir="ltr"><<a href="mailto:xtzgzorex@gmail.com">xtzgzorex@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 02/05/2012 11:04 PM, Johannes Pfau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am Sun, 5 Feb 2012 18:04:12 +0100<br>
schrieb Johannes Pfau<<a href="mailto:nospam@example.com" target="_blank">nospam@example.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I will probably need some more time to get this working...<br>
<br>
</blockquote>
<br>
I have some good news:<br>
<a href="http://www.mediafire.com/?107we120sh3xx" target="_blank">http://www.mediafire.com/?<u></u>107we120sh3xx</a><br>
<br>
I fixed that problem and then the whole build worked fine. I'll post<br>
build instructions soon, but the binaries are ready. I only did a<br>
simple gdc -c test.d to check the compiler, but it seems to work.<br>
<br>
Linking against druntime fails, as it uses functions which are not<br>
available on Android (backtrace, signal stuff).<br>
<br>
I also built a simple hello world on linux (printf, no runtime) and ran<br>
it on my android phone, and it worked!<br>
<br>
In case you haven't used GDC without runtime before, a short<br>
introduction:<br>
<br>
* use gdc -nophoboslib to make gdc not link against phobos (and afaik,<br>
   druntime)<br>
* theres also -nostdlib in case you need it<br>
* complex code may require -fno-section-anchors because of bug #120<br>
* You'll get an error about a missing _Dmodule_ref symbol. That symbol<br>
   is used by module constructors and not generated by gdc if<br>
   -nophoboslib was passed. As long as you don't run the module<br>
   constructors, you can add a fake _Dmodule_ref in a .c file:<br>
<br>
------------<br>
void* _Dmodule_ref;<br>
------------<br>
<br>
* The compiler defines version(Android)<br>
<br>
Here's my hello world:<br>
------------<br>
version(Android)<br>
{<br>
     pragma(msg, "Hello Android!");<br>
}<br>
<br>
extern(C)<br>
{<br>
     int printf(in char* format, ...);<br>
}<br>
<br>
extern(C) void main()<br>
{<br>
     printf("Hello, %s!\n".ptr, "Android".ptr);<br>
}<br>
------------<br>
<br>
compile the _Dmodule_ref into hack.o, then use<br>
gdc -nophoboslib hello.d hack.o<br>
</blockquote>
<br></div></div>
Can we standardize that Android version identifier? Would be good to have it on <a href="http://dlang.org/version.html" target="_blank">dlang.org/version.html</a>.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
- Alex<br>
</font></span></blockquote></div><br>