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
> Life is not so simple. Currently I have following troubles with
> - 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.
> My github:
I'll take a look.
More information about the digitalmars-d-ldc