port to NetBSD
Kai Nacke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Thu Jan 7 15:22:45 PST 2016
On Thursday, 7 January 2016 at 03:14:48 UTC, Joakim wrote:
> On Wednesday, 6 January 2016 at 18:36:10 UTC, David Nadlinger
> wrote:
>> Dear Nikolay,
>>
>> On 6 Jan 2016, at 19:18, Nikolay via digitalmars-d-ldc wrote:
>>> It looks like problem with dmd2/root/port.c
>>> CMakeFiles/LDCShared.dir/dmd2/root/port.c.o is not included
>>> into CMakeFiles/ldc2.dir/link.txt
>>
>> port.c is part of libldc.a, so this is not the issue. Instead,
>> as you noted (absence of any symbols) port.c currently does
>> not have an implementation for NetBSD.
>>
>> The file is designed to encapsulate all the functions used
>> within the front-end that are not portable between operating
>> systems. You'll need to implement it for NetBSD, although I
>> suspect you can probably re-use most of the __FreeBSD__ and
>> __OpenBSD__ code.
>
> In addition, I see 14 more files which reference FreeBSD
> somewhere, so you will have to look at each of those and make
> sure you make the necessary changes for NetBSD. In most cases,
> all that should be necessary is adding the equivalent NetBSD
> check to the list of Posix-like OS's.
After porting the compiler you also need to enhance druntime. In
most cases you can simple duplicate the FreeBSD code I guess.
I am happy to accept PR's for ldc code. druntime PR's should go
upstream first. I will then cherry-pick them if necessary.
Regards,
Kai
More information about the digitalmars-d-ldc
mailing list