On 3 May 2008, at 10:26, hns@computer.org wrote:
c) Real cross-compiling
This means that you have a gcc version on your Linux machine that
emits executables that run on OSX. Unfortunately, OSX uses MACH-O
binaries and building a cross-compiling gcc is very tricky.
I've not tried building Apple GCC on non-Apple platforms, but even
if you do this then you need more to get a real cross-compiling
environment. You also need copies of every header file that your
program includes. You can't substitute GNUstep's Foundation.h for
Apple's, since they have different instance variable layouts so any
of your subclasses of Apple classes will be wrong. This header also
includes other headers which define things like the sizes and
layouts of of C types and so on, These can be acquired from the
Darwin sources, but you'll still need the framework headers which
are not publicly redistributable. In short, cross compiling is
hard, which is why hardly anyone does it.
Improving GNUstep Make to build native OS X applications (it already
works nicely for frameworks) would be a better approach, but I'm not
sure how much effort this would be. Building OS X apps from a
makefile isn't very hard, although fat binaries are slightly harder,
so it might be worth investigating.