Mac OS X cross-compiler problems

Erik van Pienbroek erik at vanpienbroek.nl
Wed Jan 27 22:14:57 UTC 2010


Op woensdag 27-01-2010 om 13:56 uur [tijdzone -0800], schreef Paarvai
Naai:
> >> # darwinx-gcc -arch x86_64 -o darwin64 darwin64.c
> >> ld warning: in
> >>
> /usr/darwinx/SDKs/MacOSX10.5.sdk/usr/lib/i686-apple-darwin9/4.2.1/libg
> >> cc.a,
> >> file is not of required architecture
> >
> > This is known behaviour. Right now only ppc and i386 are supported.
> > Adding support for x86_64 is pretty straightforward so I'm currently
> > rebuilding gcc right now with x86_64 support. I'll hope that I can
> > publish the result in a few hours (or else it'll be tomorrow
> evening).
> 
> Okay, I was originally confused since x86_64 objects could be compiled
> successfully but the linking that failed.  Good to know that you are
> already aware of this and are actively working on finishing it.  I'll
> look forward to your update in the next day or so.

I just looked into it and apparently Apple did something ugly to get
x86_64 support in GCC. Instead of creating a compiler for the
x86_64-apple-darwin9 target they integrated x86_64 support in the
i386-apple-darwin9 target... This could also be the reason why only the
linker step fails for you. I don't know how Apple managed to do this so
for now I'm resorting to a seperate x86_64-apple-darwin9 target.

> By SDK, are you referring to the files in
> darwinx-sdk-leopard-312_2621-13.fc11.noarch.rpm? If so, I am familiar
> with what you are talking about.  But, aside from these SDK issues,
> are there any technical issues remaining with the tools themselves?

Actually I was referring to the SDK which can be downloaded from the
Apple website (it's 1GB+ and only reachable for registered users). The
RPM you're referring to is a stripped down version of the SDK which
contains just the pieces which are interesting for us.

As far as I can remember right now there's only one technical issue
pending (though not critical). That's support for debug symbols.
Apple created a tool called 'dsymutil' to merge debug symbols in
binaries. However, the source code of this tool isn't available (or
better said: I couldn't find it anywhere yet) so adding debug symbols to
binaries is broken right now.

Regards,

Erik van Pienbroek




More information about the mingw mailing list