MirPorts now not only contain ports for various compilers such as pcc (which does not suck anymore), LLVM+Clang (which does suck, because it’s written in ugly CFrustFrust) and llvm-gcc 4.2, it can also peruse them to compile packages:
- $ mmake USE_COMPILER=system # mgcc (C, C++), Default
- $ mmake USE_COMPILER=pcc # pcc (C only)
- $ mmake USE_COMPILER=llvm # llvm-gcc (C, C++, Fortran 77/9x)
While clang cannot yet be used there really, the Build.sh script of mksh can use its “ccc” compiler driver (which however is experimental) as well as llvm-gcc to build mksh(1)… to native code, or to intermediate bytecode (with link-time intra-module optimisation and final assembly into native code).
The LLVM Interpreter lli also, surprisingly, works. No patch required.
This (LLVM) is for MirOS-current i386 only; Darwin probably just needs to be tested, whereas MidnightBSD and OpenBSD require some more work.
TODO: there is an LGPL’d lzmadec binary, C only even; do something with it, possibly to ease use of .clz binary packages. Recent storage needs have become utterly ridiculous.