Hacker News new | past | comments | ask | show | jobs | submit login

I know this works on Macs with Intel chips. But the ones with ARM chips just won't execute fully static binaries, and I'm wondering if there's a workaround.



I’m guessing not. According to man ld on macOS, the -static flag, to produce a fully static executable, is only used to build the kernel. I don’t believe fully-static executables were ever officially supported on macOS, although they would work.


For clarity it's not the chip/ARM that causes the limitation, you can recompile the kernel (it's open source) to remove the block and it'll work fine - it's just a ton of work.

Alternatively, Linux :).


It only works if you don't ever upgrade macOS. Even a patch update sometimes can break it.


Nope.


Thanks. That sucks


If you can convince Apple to change this code let me know: https://github.com/apple-oss-distributions/xnu/blob/94d3b452...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: