Page 1 of 1
D Cross Compiler
Posted: Mon Mar 03, 2014 1:54 pm
by Binero
Is there a way to setup a D cross compiler, suitible for OS development? The wiki has an article on this (
GDC Cross-Compiler), but it is extremely outdated.
What can I expect from the cross compiler? I'm assuming there won't be a runtime / GC and such, and thus I can't create structs / classes and it'll just be a fancy C?
Re: D Cross Compiler
Posted: Mon Mar 03, 2014 2:45 pm
by sortie
That article is out of date and unfinished as you point out, I would just recommend you do a kernel in C or C++ as described in Bare Bones.
Re: D Cross Compiler
Posted: Thu Mar 06, 2014 5:42 am
by Satoshi
Re: D Cross Compiler
Posted: Sat Mar 08, 2014 9:38 am
by OSwhatever
Binero wrote:Is there a way to setup a D cross compiler, suitible for OS development? The wiki has an article on this (
GDC Cross-Compiler), but it is extremely outdated.
What can I expect from the cross compiler? I'm assuming there won't be a runtime / GC and such, and thus I can't create structs / classes and it'll just be a fancy C?
Both LDC and GDC support other architectures than x86 and LDC is inherently a cross compiler. You have to adjust the runtime so that it supports the architecture and it is the runtime that is the challenge with D to get it to work both with a new architecture and in an OS free environment. D is not like C/C++ that can emit bare metal code directly without any runtime support.
There are some people like Bloodman who has made an OS free runtime. Take a look at that code and you might get some idea how to port D for your needs.