This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linking ELF on Mac OS X with GCC
- From: Mike Stump <mrs at apple dot com>
- To: Jonathan Johnson <jon at maccoding dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 16 May 2004 18:38:40 -0700
- Subject: Re: Linking ELF on Mac OS X with GCC
On Sunday, May 16, 2004, at 05:46 PM, Jonathan Johnson wrote:
Forgive me if this has been asked before, but I've been searching for
most of the day and haven't found any answers. I currently build on
two machines, but I'd like to build on one instead of two. Currently,
I build the Linux version on my Linux box, and my Mac OS X version on
the Mac. I'd like to compile the Linux version on Mac OS X, and I
think I have the platform settings correct to generate X86 code, but I
can't figure out how to tell it I want an ELF executable or shared
library.
This should be trivial enough to do, just build it up and presto, it'll
work. Try config.guess on your linux system, and it will tell you what
to target, and use --target=blabla to target it. In addition, you'll
need binutils already compiled up and installed and you'll need headers
and library and so forth. See the installation manual. What you want
it called a cross compiler, there are FAQs on building one up, take a
look at those.