DMD 2.066.1 and LDC 0.15.1.
Ah ok, I've only tested it with master.
Most of it involved adding some ulong -> uint casts and
Looks like I forgot to test it on linux and 64-bit https://github.com/D-Programming-Language/dmd/pull/4251
commenting out _d_newclass and everything involving __va_argsave.
Hmm, __va_argsave might be a dmd-specific hack. It should work fine with or without _d_newclass though.