port to NetBSD

Joakim via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Jan 8 11:09:09 PST 2016

On Friday, 8 January 2016 at 18:08:38 UTC, Nikolay wrote:
> On Thursday, 7 January 2016 at 23:22:45 UTC, Kai Nacke wrote:
>> After porting the compiler you also need to enhance druntime. 
>> In most cases you can simple duplicate the FreeBSD code I 
>> guess.
> Life is not so simple. Currently I have following troubles with 
> druntime:
>    - For some reason static ctor std.stdiobase is not called. 
> So I have to call std_stdio_static_this() manually.
>    - I have troubles with floating point methods like llroundl, 
> remainderl, ... As I can understand they are builtin in C 
> compiler and there is no library for them. Also I have one 
> failed assert in phobos 
> std.internal.math.gammafunction.logmdigammaInverse :  static 
> assert(maxY > 0 && maxY <= real.max); My be it is related to 
> the previous problem.

Looks like you got pretty far, as most of those are problems in 
phobos, not druntime.  For the last one, try turning maxY into a 
runtime variable, ie replace enum with real, and change that 
static assert to regular assert, ie remove static.  That fixed 
the issue for me on ARM, which was due to CTFE.  Are you 
cross-compiling or compiling on NetBSD itself?

>> 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
> https://github.com/ldc-developers/ldc/pull/1247
> My github:
> https://github.com/nrTQgc/ldc
> https://github.com/nrTQgc/druntime.git
> https://github.com/nrTQgc/phobos.git

I'll take a look.

More information about the digitalmars-d-ldc mailing list