GDC guys, can this toolchain support D?

Manu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 10 17:40:31 PST 2017


On 10 January 2017 at 19:04, Iain Buclaw via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On 10 January 2017 at 09:22, Manu via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
> > Can any of the GDC guys comment on how difficult it would be to get this
> > toolchain build script to include building GDC?
> >
> > https://github.com/SaturnSDK/Saturn-SDK-GCC-SH2
> >
> > I have a mate who's hacking on the Saturn and wants to build one of my
> > projects.
> > It'd be a really great test for embedded D; fairly small realtime
> target. I
> > expect binary size to be a problem ;)
>
> Debian already has builds for SH4, there's just no druntime support.
>

Cool. Obviously, this is an SH2 toolchain, and it's baremetal, not linux.
Not sure what c-runtime it uses, but probably not glibc.

https://goo.gl/dznZIF
>
> But getting druntime working on it should be trivial enough.
>

I'm looking for just the BetterC experience, but druntime still seems
somewhat necessary... what parts need to be implemented for BetterC to work
well?

- Fix core.stdc.* to handle the arch-specific bits for SH (just copy
> from C headers).
> - There's threadasm.S if you want to implement native fiber support,
> otherwise you can fall back to ucontext_t.
>

I expect existing SH4 code should be mostly compatible, and a good
headstart.
Doesn't sound too bad. I'm not using fibers though.

Does double == float on this platform?  That might be interesting...
>

I think SH2 supports double, but it would be terminally slow... Is there a
way to force double == float? What would that do to D?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170111/219e27ae/attachment.html>


More information about the Digitalmars-d mailing list