finds.dev← search

// the find

FiloSottile/homebrew-musl-cross

★ 668 · Ruby · ISC · updated Jan 2026

Homebrew Formula for static-friendly musl-based GCC macOS-to-Linux cross-compilers

A Homebrew formula that builds GCC cross-compilers from macOS to musl Linux targets, using richfelker's musl-cross-make underneath. It is for developers who need static or musl binaries from a Mac, mainly for Go with cgo, Rust, or C projects that run on Alpine or in minimal containers.

- One brew install produces the whole toolchain, and the README gives working env vars and linker config for Go cgo and Rust, which are the two places people usually get stuck.

- Architectures are opt-in through brew options. The default set is amd64, arm64, and arm, and the rest are not forced on everyone.

- It builds on richfelker/musl-cross-make instead of maintaining its own compiler recipe, so the hard toolchain logic lives upstream, where it gets more scrutiny.

- The README is clear about what the output is: musl binaries only run on musl systems unless they are linked statically, and it says so before you hit the problem.

- A custom build takes about ten minutes per architecture on an M2 MacBook Air, and each installed architecture is 200 to 500 MB. The default set is a real cost in time and disk.

- The formula is macOS-only by design. Linux and Windows hosts are out of scope, so anyone on those needs a different setup.

- The README admits the build can assume a musl host compiler wrapper that is missing. The workaround is a manual symlink into /usr/local/bin, which the formula does not handle itself.

- The last push was in January 2026. This formula pins to a moving upstream toolchain, so check that it still builds on your macOS and Homebrew versions before you depend on it.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →