D on other platforms than Win,Lin,Mac?

Andrew Wiley wiley.andrew.j at gmail.com
Wed Sep 7 08:18:34 PDT 2011


On Wed, Sep 7, 2011 at 2:46 AM, Johannes Pfau <spam at example.com> wrote:

> Andrew Wiley wrote:
> >On Tue, Sep 6, 2011 at 2:25 PM, Johannes Pfau <spam at example.com> wrote:
> >
> >> Trass3r wrote:
> >> >> I've heard that our company is considering the T20 from
> >> >> Toradex.com for a new project with remote hardware. The platform
> >> >> runs on Nvidia Tegra and Linux.
> >> >>
> >> >> Since I have been very impressed by the D programming language,
> >> >> for some years now, could it be possible to use D in such
> >> >> projects?
> >> >
> >> >You'd have to use gdc or ldc and patch at least druntime.
> >> >Some people already managed to get stuff running on ARM but it's
> >> >tricky.
> >>
> >> At least for gdc only hello-world like code works. Real code hits
> >> this issue:
> >>
> >>
> https://bitbucket.org/goshawk/gdc/issue/215/alignment-of-struct-members-wrong-on-arm
> >>
> >> This also applies to all platforms which aren't supported by dmd.
> >>
> >> > I think the GC is problematic, thus you also have to avoid
> >> >most of phobos.
> >>
> >> The GC seems to work if druntime is compiled with
> >> -fno-section-anchors , but no real testing was done.
> >>
> https://bitbucket.org/goshawk/gdc/issue/120/fsection-anchors-broken-on-arm
> >> might also be caused by bug 215.
> >>
> >>
> >+1
> >
> >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.
> >
> I only had a cheap ARM5TE till now, but yesterday my PandaBoard arrived
> (OMAP4 / Dual Core Cortex A9 / ARM7). But the SD Card I ordered is
> broken, I'm waiting for a replacement now.
>
> Anyway: Are you referring to this?
> http://www.mjmwired.net/kernel/Documentation/arm/mem_alignment
>
>
Yes. That won't make our OS structs match up, but it should keep alignment
problems from crashing the program otherwise.

Also, my experience with LDC was that it doesn't have the Druntime patches
it needs, but I seem to recall adding enough to get it building, then
watching LDC segfault. I think they're already fixing the alignments (though
I'm not familiar enough with their source to be certain that's what I was
seeing), but there seems to be some other issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110907/8938f590/attachment.html>


More information about the Digitalmars-d-learn mailing list