The target platforms (operating system, compiler toolchain, instruction set) on top of which musl is known to work.
musl is built on the Linux syscall layer. Linux kernel >=2.6.39 is necessary for POSIX conformant behaviour, older kernels will work with varying degrees of non-conformance, 2.4 kernels will only work for simple single-threaded applications.
Supported target architectures (ABIs)
- x86 (SysV ABI)
- x86_64 (SysV ABI)
- arm eabi (armv4t or later, requires gcc >= 4.2.4 for softfp, gcc >= 4.5.4 for hardfloat)
- mips/mipsel o32 (MIPS1 with kernel emulation of ll and sc instructions, or MIPS2 or later, softfloat is supported as well)
- mips n64
- microblaze (
needs toolchain from xilinx, xilinx gitwebneeds gcc >= 4.8 (you can use musl-cross)) and linux 3.13 or this patch.
- powerpc (needs gcc built with –enable-secureplt –with-long-double-64, and -Wl,–secure-plt to link dynamic binaries.)
- x32 (experimental, due to a number of kernel issues) - requires GCC 4.7 or later (musl-cross is already capable of building a toolchain), you need at least linux 3.4, but note that there were security issues.
- openrisc 1000
- sh (experimental) with sh, sheb, sh-nofpu, and sheb-nofpu subarchs (currently this kernel-patch is required for multithread usage)
- riscv64 ( support added since 1.1.23 release ) currently softfp, single-precision, double-precision floating point supported
Any conformant C and C++ compiler should be able to use musl (to compile and link application code).
As of 2013-09-29, the following compilers are known to be able to compile musl:
- GCC (>=3.4.6)
- started with gcc 4.8.1, the memset code will be miscompiled. This can be worked around by adding -fno-tree-loop-distribute-patterns to the CFLAGS or passing –enable-optimize=size to configure.
- musl-cross provides prebuilt cross-compiler toolchains and cross-compiler build instructions.
- GCC is officially supported using the musl-gcc wrapper or the musl-cross project (for details see Getting started).
- Clang (>=3.2)
- PCC (>=1.1.0.DEVEL)
- configure musl with –disable-shared, since firm does not yet have position-independent code generation.
Bootstrapping a working qemu development environment for microblaze is hard, here are the needed steps to do so.
See Porting for information on how to port musl to a new architecture.