Okay I jumped through a lot of hoops but ended up with a pretty dang simple overall process: 1) Install the musl toolchain, on Ubuntu/Debian: `sudo apt install musl musl-dev musl-tools` 2) Use flags `--passL:-static --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc` 3) Probably a good idea to use `--dynlibOverrideAll` just to be sure you're not dynamically linking anything. 4) Any libs you include need to be compiled as static `.a` files. 5) Link them in like so: `--passL:path/to/lib_file.a` And that's really all it ended up being. The musl toolchain does most of the work for you.