# Cross-compiling with musl Toolchains

DevFeed: [Cross-compiling with musl Toolchains](<https://devfeed.tech/articles/cross-compiling-with-musl-toolchains-27450.md>)

Original publisher: [Read original article](<https://ariya.io/2020/06/cross-compiling-with-musl-toolchains/>)

Published: 2020-06-22T12:37:59Z

Content type: tutorial

Language: en

Sources: [Ariya Hidayat](<https://devfeed.tech/sources/ariya-hidayat.md>)

Topics: [Cross-Compilation](<https://devfeed.tech/topics/cross-compilation.md>), [toolchains](<https://devfeed.tech/topics/toolchains.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Zig](<https://devfeed.tech/topics/zig.md>), [C](<https://devfeed.tech/topics/c.md>), [qemu](<https://devfeed.tech/topics/qemu.md>), [ci](<https://devfeed.tech/topics/ci.md>), [make](<https://devfeed.tech/topics/make.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [cross-compilation](<https://devfeed.tech/tags/cross-compilation.md>), [docker](<https://devfeed.tech/tags/docker.md>), [linux](<https://devfeed.tech/tags/linux.md>), [make](<https://devfeed.tech/tags/make.md>), [mips](<https://devfeed.tech/tags/mips.md>), [qemu](<https://devfeed.tech/tags/qemu.md>), [toolchains](<https://devfeed.tech/tags/toolchains.md>), [windows](<https://devfeed.tech/tags/windows.md>), [x86](<https://devfeed.tech/tags/x86.md>)

## AI overview

A tutorial on using static musl-based toolchains to cross-compile command-line programs for multiple targets, including MIPS and Windows, from a Linux x86-64 host. It also covers testing non-native binaries with QEMU and migrating FastLZ continuous integration to musl.cc.

## Source excerpt

When working on command-line utilities which can be useful for various platforms, from Windows on x86 to Linux on MIPS, the existence of a cross-compilation is highly attractive. A number of different binaries can be constructed conveniently from a single, typically powerful host system.