Which C runtime for MinGW and *BSD?
Kai Nacke via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 3 08:02:21 PDT 2015
Hi all!
I am trying to compile D code for MinGW and *BSD. Of course, I am
using LDC.
The situation is a bit chaotic.
For MinGW, the compiler defines the versions Windows, Win32 and
MinGW.
For *BSD, the compiler defines the *BSD version
(FreeBSD/DragonFlyBSD/NetBSD/OpenBSD) and Posix.
If you try to compile druntime/Phobos:
- it compiles on FreeBSD :-)
- all other *BSD variants cause compile errors
- there are still some version(MinGW) sections in druntime but
most of them moved to CRuntime_DigitalMars / CRuntime_Microsoft
sections and are not available.
I like to clean this up. But what is the best way? Options are:
- create new sections for MinGW/DragonFlyBSD/NetBSD/OpenBSD and
duplicate the definitions.
- define new C runtimes for MinGW (CRuntime_MinGW) and *BSD
(CRuntime_libc).
MinGW/CRuntime_MinGW is a mix between the Windows and the GNU
libraries. This requires some work.
CRuntime_libc could be used to consolidate the current code. As
far as I know, BSD libc is also used by OS X and Solaris. This
could reduce the amount of definitions.
Are there other solutions? What do you think?
Regards,
Kai
More information about the Digitalmars-d
mailing list