On 6 Jan 2014 17:55, "Sean Kelly" <s...@invisibleduck.org> wrote:
>
> On Monday, 6 January 2014 at 11:47:57 UTC, Dwhatever wrote:
>>
>> 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.
>
>
> D doesn't require Phobos.  The compiler implicitly links against
> libphobos.a, but that isn't the same thing.  All a D app actually
> needs is Druntime.  And you can replace the GC in Druntime with
> gcstub (backed by malloc) and stub out the thread API if these
> aren't appropriate for your target.

GDC provides a configure flag to compile in gcstub instead of the standard
GC.

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.

Reply via email to