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: Dan Kegel <dank at kegel dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>, jon at maccoding dot com
- Date: Mon, 17 May 2004 06:57:58 -0700
- Subject: re: Linking ELF on Mac OS X with GCC
> On Sunday, May 16, 2004, at 05:46 PM, Jonathan Johnson wrote:
>
> > ... 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.
Yup. I did this recently, and updated my crosscompiler build script to
support MacOSX as a build system. It's at
http://kegel.com/crosstool/crosstool-0.28-rc16.tar.gz
Please give it a try and let me know if it does the trick
for you. (I even include distcc support, so you can make
at least your Linux compiles go faster if you have a couple
extra boxes laying around.)
Caveat emptor, though; I've been updating the script a lot
lately, and though it passed my regression tests on Linux
last night, it's been a few weeks since I tried it on MacOSX.
If you run into any problems, please let me know.
Followups to the crossgcc mailing list, please.
- Dan
--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change