<p dir="ltr">On 6 Jan 2014 17:55, "Sean Kelly" <<a href="mailto:sean@invisibleduck.org">sean@invisibleduck.org</a>> wrote:<br>
><br>
> On Monday, 6 January 2014 at 11:47:57 UTC, Dwhatever wrote:<br>
>><br>
>> I'm trying to do the same, trying to compile OS free code but I haven't so far been successful because D requires the runtime and then also Phobos.<br>
><br>
><br>
> D doesn't require Phobos.  The compiler implicitly links against<br>
> libphobos.a, but that isn't the same thing.  All a D app actually<br>
> needs is Druntime.  And you can replace the GC in Druntime with<br>
> gcstub (backed by malloc) and stub out the thread API if these<br>
> aren't appropriate for your target.</p>
<p dir="ltr">GDC provides a configure flag to compile in gcstub instead of the standard GC.</p>
<p dir="ltr">There's also a pthread inspired thread API (gcc.gthreads) that provides a common interface to the platform-specific implementation - not all gcc supported thread models have been ported in yet (only posix and win32) though on bare metal you may just want to compile with thread model=single.</p>