4 ms·
Static cross and native musl-based toolchains
- wyldfire 8y agoThis 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/
- writepub 8y agoIf 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!
- ainar-g 8y agoSince 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
- rolleiflex 8y agoI’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-compilers-for-macos/ https://blog.filippo.io/easy-windows-and-linux-cross-compile... 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
- ploxiln 8y agocorrect me if I'm wrong: mingw-w64 has nothing to do with musl libc, which is exclusively for Linux
- rolleiflex 8y agoAh - the article explains how to cross compile via musl. The article mentions doing it for Linux, I am using a similar process for Windows. The article also recommends mingw for Windows, but that is unrelated.
- writepub 8y agoThis 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 8y agoNo 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.