<div class="gmail_quote">On Tue, Sep 6, 2011 at 2:25 PM, Johannes Pfau <span dir="ltr"><<a href="mailto:spam@example.com">spam@example.com</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">Trass3r wrote:<br>
>> I've heard that our company is considering the T20 from Toradex.com<br>
>> for a new project with remote hardware. The platform runs on Nvidia<br>
>> Tegra and Linux.<br>
>><br>
>> Since I have been very impressed by the D programming language, for<br>
>> some years now, could it be possible to use D in such projects?<br>
><br>
>You'd have to use gdc or ldc and patch at least druntime.<br>
>Some people already managed to get stuff running on ARM but it's<br>
>tricky.<br>
<br>
</div>At least for gdc only hello-world like code works. Real code hits this<br>
issue:<br>
<a href="https://bitbucket.org/goshawk/gdc/issue/215/alignment-of-struct-members-wrong-on-arm" target="_blank">https://bitbucket.org/goshawk/gdc/issue/215/alignment-of-struct-members-wrong-on-arm</a><br>
<br>
This also applies to all platforms which aren't supported by dmd.<br>
<div class="im"><br>
> I think the GC is problematic, thus you also have to avoid<br>
>most of phobos.<br>
<br>
</div>The GC seems to work if druntime is compiled with<br>
-fno-section-anchors , but no real testing was done.<br>
<a href="https://bitbucket.org/goshawk/gdc/issue/120/fsection-anchors-broken-on-arm" target="_blank">https://bitbucket.org/goshawk/gdc/issue/120/fsection-anchors-broken-on-arm</a><br>
might also be caused by bug 215.<br>
<font color="#888888"><br></font></blockquote><div><br></div><div>+1</div><div><br></div><div>If you're looking at an ARMv7 platform (my Tegra is ARMv7, dunno if they all are), I believe you can set the Linux kernel to handle faults caused by unaligned memory accesses, which *should* make D run with a performance hit until this bug gets fixed. Keep in mind that the library situation is largely untested, although Iain seems to have quietly done a lot of work in Druntime at some point to make it all build. Once I've got my Tegra up and running (need a serial cable - it's in the mail), I'll be able to say more.</div>

</div><br>