
Static cross and native musl-based toolchains - edelsohn
http://musl.cc/
======
ainar-g
Since we're talking musl, the author of the library has recently asked[1] the
community to support him more actively on Patreon[2].

[1]
[https://twitter.com/RichFelker/status/1101157783620255744](https://twitter.com/RichFelker/status/1101157783620255744)

[2]
[https://www.patreon.com/musl/overview](https://www.patreon.com/musl/overview)

------
wyldfire
This is great. Another handy musl-based toolchain that supports some of these
targets is ellcc [1]. It's llvm+clang based. It's a little behind so I suppose
it doesn't support RISCV yet. It will probably never support SH targets
because those aren't in llvm and there aren't any public plans to add one
AFAIK.

[1] [http://ellcc.org/](http://ellcc.org/)

------
rolleiflex
I’m using musl to cross-compile static Windows binaries from Mac for my app
[0]. Here’s the instructions I use for it: [https://blog.filippo.io/easy-
windows-and-linux-cross-compile...](https://blog.filippo.io/easy-windows-and-
linux-cross-compilers-for-macos/)

I’ve been using this in real world production builds and I’ve had no issues so
far, I compile SQLite with it as it’s my main C dependency. No slowdowns,
nothing weird happening, it just works like a champ. Very impressive.

[0] (Obvious disclosure, I’m the developer)
[https://getaether.net](https://getaether.net)

~~~
writepub
This is great! Thank you for the work and information on how to use it.

Have you been able to get musl-libc to compile on and for Mac OSX/iOS, along
with a supported musl-gcc-wrapper? The thought of a completely statically
linked, self contained binary/library for Mac/iOS is salivating

~~~
rolleiflex
No unfortunately, I’ve not needed that, since my native development
environment is Mac and I need cross compile the other way round. I don’t see
why it should not work theoretically, but my interpretation is that Apple’s
licenses for Cocoa / iOS do not allow that.

------
writepub
If I understand this correctly, since MUSL's USP is static linking of musl-
libc thereby removing any dependency on breaking changes in glibc, we now have
the ability to build with the exact same compiler and generate stand-alone
binaries without a libc dependency on Windows, Mac, Linux, across multiple
processors (x86, x64, ARM, ARM-64, ...).

This is fantastic news!

