[Wlug] Cross Compile Question

Marc Hughes mhughes@wpidalamar.com
Thu, 19 Dec 2002 11:44:30 -0500


I'm trying to make a cross-compiler on an i386 linux box to a ppc darwin
(OSX) box.  I downloaded binutils, configured them with
./configure --target=powerpc-apple --prefix=/usr/local
Build them, and installed them.

Then I went and got gcc (with g++), configured it with:
./configure --target=powerpc-apple-darwin --prefix=/usr/local

I also made a symlink from /usr/local/powerpc-apple ->
/usr/local/powerpc-apple-darwin since it seemed to fix a problem in the
gcc compile.

When I try to build gcc, it goes for a minute or so, and then I get this
towards the end:

libbackend.a(varasm.o): In function `assemble_alias':
/data/hughesm/tmp/gcc-3.1/gcc/varasm.c:5184: undefined reference to
`ASM_OUTPUT_DEF'
collect2: ld returned 1 exit status
make[1]: *** [cc1] Error 1
make[1]: Leaving directory `/data/hughesm/tmp/gcc-3.1/gcc'
make: *** [all-gcc] Error 2

I'm not really asking for the exact cause of the error... I'm just
trying to figure out if I'm even going about this the correct way.  The
documentation on cross compiling is a bit sparse.  It seems odd to me
that the targets don't match (but there is no powerpc-apple-darwin in
binutils, and no powerpc-apple in gcc)

All that being said, I'm doing this so I can add my linux boxes to my
OSX build farm.  Check out distcc.samba.org for a wicked cool and easy
way to distribute compiles.

-Marc