Porting DMD compiler to haiku OS

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Wed May 7 08:26:22 PDT 2014


On Wednesday, 7 May 2014 at 11:40:59 UTC, iridium wrote:
> On Wednesday, 7 May 2014 at 06:21:48 UTC, Daniel Murphy wrote:
>> "iridium"  wrote in message 
>> news:ltcxhbcqltnltbiddqyy at forum.dlang.org...
>>
>>> Yes. optabtgen now runs correctly. Now another error. I 
>>> understand the error during assembly: 
>>> http://itmages.ru/image/view/1652519/5fa513e0
>>
>> Linker error actually.
>>
>> The first one is saying it can't find Obj::init which is in 
>> backend/cgobj.c inside a #if OMFOBJ and backend/elfobj.c 
>> inside #if ELFOBJ.
>>
>> I'd guess you need to fix the conditioin in cdef.h to include 
>> TARGET_HAIKU
>>
>> -#define ELFOBJ          (TARGET_LINUX || TARGET_FREEBSD || 
>> TARGET_OPENBSD || TARGET_SOLARIS)
>> +#define ELFOBJ          (TARGET_LINUX || TARGET_FREEBSD || 
>> TARGET_OPENBSD || TARGET_SOLARIS || TARGET_HAIKU)
>>
>> And the rest are probably similar things.
>
> I was able to build a compiler. Follow the link to see the 
> result: http://itmages.ru/image/view/1654442/ecbf7af1
>
> Now the problem with the assembly of the druntime... 
> http://itmages.ru/image/view/1654445/31a30d8d

Take a look at my recent patches to add Android/x86 support to 
druntime:

https://github.com/D-Programming-Language/druntime/pull/681
https://github.com/D-Programming-Language/druntime/pull/734
https://github.com/D-Programming-Language/druntime/pull/738

You will need at least the first two to get druntime working with 
a trimmed down mak/SRCS, then a version of the last pull to get 
all of druntime to compile.


More information about the Digitalmars-d mailing list