MinGW-w64 runtime library inclusion (Clang-compiled) for proper Win64 support?
kink
noone at nowhere.com
Fri Jun 14 12:19:50 PDT 2013
> I haven't checked what the exact licensing situation of the
> MinGW runtime is (apart from some parts which I know are public
> domain) but I imagine there might be potential problems in this
> area.
Hi David, from what I've seen, the MinGW-w64 CRT seems to be
entirely public domain.
I got the whole thing (latest v2.0.8) to compile; a few linking
issues remain, working these out wouldn't be a problem. I chose
to use the MinGW-w64 headers exclusively (no MS headers) to keep
things simple and basically only had to adapt a few headers in a
few places after I let Clang 3.4 run in a GCC-compatible way
(cmdline options: -c -nostdinc -target x86_64-pc-win32 -Xclang
-cxx-abi -Xclang microsoft -fno-ms-compatibility -fmsc-version=0).
The thing is that Clang maps C "long double" to double as well,
just like MSVC. I'm not sure if that's generally the case when
targeting Windows or only if Clang itself has been compiled with
MSVC and not with MinGW. GCC's __float80 does not seem to be
supported either. So I think there's probably a good reason for
the dropped x87 support; I don't know about how well it is still
supported in x86 hardware nowadays and how slow it is compared to
scalar SSE code.
So maybe the best course of action would be to map D's real type
to double as well, either as default setting in LDC for Windows
or at least as option. I wouldn't miss the x87 type; I just want
working reals support as it's used in Phobos' std.math all over
the place.
More information about the digitalmars-d-ldc
mailing list