• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compiling for more than 1 architecture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling for more than 1 architecture


  • Subject: Re: Compiling for more than 1 architecture
  • From: John Davidorff Pell <email@hidden>
  • Date: Mon, 25 Oct 2004 23:48:42 -0700

In order to build for any single architecture, you need the complete compiler tool chain for that architecture. The Xcode dev tools comes with a complete compiler tool chain for you *mac*. In order to compile for Mac OS X for i386 (which you can only use if you work at Apple), you need the MacOSX i386 compiler tool chain (which you can only get if you work at Apple).

To compile on Mac OS X and run on linuxPPC, you need the complete linux powerpc compiler tool chain (which you can compile, if you have the balls). To compile on Mac OS X and run on linux i386... etc.

"Fat" binaries are a mach-o concept. In order to run on a system that does not use mach-o (linux uses ELF, other UNIXs use other formats), you need an ELF compiler chain (which produces binaries that do not run on mach-o systems (like Mac OS X)). So, you have no hope (or need, i dare say) for fat binaries.

In summary, to compile on your mac but run on linuxPPC you need the gcc compiler tool chain compiled on your mac, but for linux ELF on i386. (paraphrased: its easier to compile it separately once on each unique architecture (once for linux ELF i386, once for linux ELF PPC, once for linux a.out PPC, once for FreeBSD ELF i386, etc.)).

JP

P.S. for reference, the error you get is telling you that it cannot find the i386 compiler tool chain. Yes, i think it should be made more user friendly. No, I don't think it actually will be.


On 24 Oct 2004, at 09:32, email@hidden wrote:

I need to be able to compile an ansi c application for several different
platforms. Preferrably fat binaries that'll run on most flavors of unix
and X server. When I try to enter a new item in the Architecture list I
get a strange error and since I'm not at my machine I cannot quote it
exactly. to paraphrase: "cannot find cc1 exec .... " I believe is the jist
of it.I suspect I am entering the wrong id for the Architecture. I tried
both i386 and i586, even NOARCH.
Two questions.
1 is the list space or comma separated.
2 is there somewhere I can see a list of architectures and how to enter
them, or perhaps general info on doing this for xcode.



Thanks for any help April.



--
"They [our enemies] never stop thinking about new ways to harm our country and our people, and neither do we. We must never stop thinking about how best to offend our country." - George W. Bush (August 5, 2004)


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Compiling for more than 1 architecture
      • From: Finlay Dobbie <email@hidden>
References: 
 >Compiling for more than 1 architecture (From: email@hidden)

  • Prev by Date: RE: Creating Bundles
  • Next by Date: Re: Compiling for more than 1 architecture
  • Previous by thread: Compiling for more than 1 architecture
  • Next by thread: Re: Compiling for more than 1 architecture
  • Index(es):
    • Date
    • Thread