D Cross Compiler

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Binero
Posts: 15
Joined: Mon Mar 03, 2014 1:00 pm

D Cross Compiler

Post 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?
Last edited by Binero on Tue Mar 04, 2014 6:41 am, edited 1 time in total.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: D Cross Compiler

Post 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.
User avatar
Satoshi
Member
Member
Posts: 28
Joined: Thu Sep 13, 2012 2:18 pm

Re: D Cross Compiler

Post by Satoshi »

Hi, im using D for developing OS. See https://github.com/Bloodmanovski/Trinix
Trinix (written in D) https://github.com/Rikarin/Trinix
Streaming OS development https://www.livecoding.tv/satoshi/
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: D Cross Compiler

Post 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.
Post Reply