Mac OS X cross-compiler problems
Erik van Pienbroek
erik at vanpienbroek.nl
Wed Jan 27 20:42:08 UTC 2010
Op woensdag 27-01-2010 om 11:11 uur [tijdzone -0800], schreef Paarvai
Naai:
> I have recently been trying to establish a working Mac OS X
> cross-compiler on a Linux host for i386 and x86_64 Darwin targets. (I
> already have one based on GCC 4.2.3 that is able to generate i386
> code.) In searching the web, I came across this mailing list and the
> good work done by Erik van Pienbroek and others in this regard. As a
> first pass, I tried to install Erik's FC11 RPMs as a quick test to see
> if the cross-compiler works.
Great to hear that people are still interested in the work I've done :)
> 1) The darwinx-odcctools is built for fc12 and does not install on
> fc11. This was a very minor problem since I downloaded the src RPM
> instead and built myself an equivalent RPM for FC11.
Yeah, the F11 version was replaced some days ago by a F12 version (due
to a newer version of openssl in F12). Rebuilding it should indeed be
sufficient to get it back operational on F11.
> 2) The x86_64 target has a problem during linking. A simple hello
> world program does not link. The program is as follows:
>
> ---
> #include <stdlib.h>
> #include <stdio.h>
>
> int main (int argc, char *argv[])
> {
> printf("hello world!\n");
> return 0;
> }
> ---
>
> # 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).
> Also what is the general status of this project? From the posts in
> June and July 2009 it sounded like there were still a few kinks to be
> worked out, but I didn't find any concrete updates after then in the
> mailing list archives.
The biggest issue so far is the license.. The SDK from Apple contains
several headers which contain a forbidden license. And next to that,
pre-compiled binary libraries aren't allowed in Fedora, everything needs
to be built from source. This means that somebody needs to write some
scripts to extract all the exported symbols from those pre-compiled
binary libraries and regenerate fake stubs from this (something similar
has also been done for the w32api).
> I think this is a very valuable project and I appreciate all of the
> effort that people have put into it so far.
Thanks!
>From time to time I still provide updates to the darwinx test
repository. For example, Qt was recently added and GCC was updated.
Regards,
Erik van Pienbroek
More information about the mingw
mailing list