Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linux/x86 to darwin/ppc cross compiler?



Yeah, its the linker that's really the problem, due to Darwin using Mach-O format.

Technically, the compiler isn't too much of a problem, and getting easier each day as Apple follows GNU more closely.

So what you'd need to do is take the darwin source for the linker and get that building on linux...I tried that a year or so ago and couldn't make much progress because the darwin build system was so funky...its gotten better too, but still isn't like the GNU one.

To do it, Makefiles would most probably have to be hacked and some headers, most notably the Mach-O ones, would need to be copied. Even then, I ran into problems because Mach-O support isn't in just a couple headers and .c files, but is instead in a lib...the bootstrap of the devtools is major undertaking on a non-darwin system. If you could fool the Makefiles to think that linux/x86 is darwin/x86, just with ELF binaries, I think that'd help.

If you haven't built a cross compiler before, I suggest doing one for linux/ppc on linux/x86 just for practice...that way, once you've got the handle of having multiple gcc's and ld's on your system, you can tackle the Mach-O issue. You'll need many of the headers and libs from the target system unless you build everything from scratch, which really isn't much fun.

You know...an ELF to Mach-O converter just might do the trick...

Hello,

I'm wondering whether there's any chance of being able to build a darwin/ppc cross compiler on linux/x86. Specifically, it looks as if darwin support doesn't exist in the GNU binutils, so my usual method for building a cross compiler won't work. Is such support planned, or is there any chance cctools will support such cross-targetting? Thanks for any help.

Dara

--

Nick Lauland
University of Texas at Austin
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >linux/x86 to darwin/ppc cross compiler? (From: Dara Hazeghi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.