How to compile Intel Mac binaries on Linux?

2019-03-28 19:55发布

问题:

I was reading an article about cross-compiling for OSX on linux, but it was quite hard to understand.

What tools do I need? And what configurations are necessary?

Are there any tools for creating packages too?

回答1:

First you need odcctools, which contains assembler and linker and such (like binutils but capable of handling the Mach-O object format). Then you need the system libraries from the official SDK. You can download it from Apple, but must agree to some stuff and become a member to do so. And finally good old gcc. Quite easy in theory, but in reallity a horrible mess. The easiest way to go (that I know of) is to use I'm Cross!.

Update: I found a newer and better updated method called xchain. It requires more manual work than I'm Cross! thou.