<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 10 January 2017 at 19:04, Iain Buclaw via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10 January 2017 at 09:22, Manu via Digitalmars-d<br>
<div><div class="h5"><<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br>
> Can any of the GDC guys comment on how difficult it would be to get this<br>
> toolchain build script to include building GDC?<br>
><br>
> <a href="https://github.com/SaturnSDK/Saturn-SDK-GCC-SH2" rel="noreferrer" target="_blank">https://github.com/SaturnSDK/<wbr>Saturn-SDK-GCC-SH2</a><br>
><br>
> I have a mate who's hacking on the Saturn and wants to build one of my<br>
> projects.<br>
> It'd be a really great test for embedded D; fairly small realtime target. I<br>
> expect binary size to be a problem ;)<br>
<br>
</div></div>Debian already has builds for SH4, there's just no druntime support.<br></blockquote><div><br></div><div>Cool. Obviously, this is an SH2 toolchain, and it's baremetal, not linux. Not sure what c-runtime it uses, but probably not glibc.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="https://goo.gl/dznZIF" rel="noreferrer" target="_blank">https://goo.gl/dznZIF</a><br>
<br>
But getting druntime working on it should be trivial enough.<br></blockquote><div><br></div><div>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?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- Fix core.stdc.* to handle the arch-specific bits for SH (just copy<br>
from C headers).<br>
- There's threadasm.S if you want to implement native fiber support,<br>
otherwise you can fall back to ucontext_t.<br></blockquote><div><br></div><div>I expect existing SH4 code should be mostly compatible, and a good headstart.</div><div>Doesn't sound too bad. I'm not using fibers though.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does double == float on this platform?  That might be interesting...<br>
</blockquote></div><br></div><div class="gmail_extra">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?</div></div>