Apple’s tools support static libraries but they do not support statically linking an entire executable [1]. All programs must link to the System framework (aka libSystem) in order to access the kernel. Apple only guarantees binary compatible at that layer. A statically linked executable would have to make system calls directly, and we do not guarantee binary compatible there.
#How can I build a C project without linking libsystem
1 messages · Page 1 of 1 (latest)
i guess on macos you need it?
you could compile freestanding
You could try to work around it but maybe you shouldn't. The application could silently break on next system update or if you run it on other OS X host. You'd be making corrupt syscalls if you had hooked them up by hand