Building Apple's gcc-1495 on linux x86 for cross-compiling
Building Apple's gcc-1495 on linux x86 for cross-compiling
- Subject: Building Apple's gcc-1495 on linux x86 for cross-compiling
- From: Adam Cohen <email@hidden>
- Date: Thu, 13 Jan 2005 18:45:05 -0500
I've been trying without much success to build Apple's copy of
gcc-1495 (or build 1671) on an x86 machine running debian sid, with
gcc 3.3.5 (Debian 1:3.3.5-6) in order to use distcc from within Xcode
to cross-compile Cocoa projects.
I've tried the instructions listed here:
<http://www.myownlittleworld.com/computers/darwin-cross-distcc.html>
(which uses a patched version of Apple's cctools), but the compile
fails with the following error:
make[2]: Entering directory `/home/build/crossdev/objdir/libiberty/testsuite'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/home/build/crossdev/objdir/libiberty/testsuite'
make[1]: Leaving directory `/home/build/crossdev/objdir/libiberty'
make: Target `install' not remade because of errors.
I've also tried the instructions here:
<http://www.opendarwin.org/pipermail/odcctools/2004-November/000034.html>
(which use odcctools), and the following configure directive:
../configure --prefix=/usr/local/crossdev
--target=powerpc-apple-darwin
--with-as=/usr/local/crossdev/bin/powerpc-apple-darwin-as
--with-ld=/usr/local/crossdev/bin/powerpc-apple-darwin-ld
--with-sysroot=/home/adam/darwin-root --enable-static --enable-shared
--enable-languages=c,objc
but the compile fails with the error:
In file included from /usr/include/netinet/in.h:23,
from ../../gcc/genindex.c:20:
../../more-hdrs/stdint.h:24:27: machine/types.h: No such file or directory
even though my configuration directive specifies --with-sysroot to
point to the directory where all my OS X headers have been copied..
(darwin-root contains usr/include, usr/lib and
System/Library/Frameworks)
If I add "-I/home/adam/darwin-root/usr/include/" to CFLAGS and then
recompile, I get:
/home/adam/darwin-root/usr/include/libkern/OSByteOrder.h:561:2: #error
Unknown endianess.
I can get around this by including -D__LITTLE_ENDIAN__ in CFLAGS as
well, but then I get:
In file included from ../../gcc/intl.h:34,
from ../../gcc/c-opts.c:32:
/usr/include/libintl.h: At top level:
/usr/include/libintl.h:47: error: parse error before "__attribute_format_arg__"
/usr/include/libintl.h:47: error: ISO C forbids data definition with
no type or storage class
So I'm just wondering if anyone on the list has successfully compiled
a copy of Apple's gcc-1495 (or 1671) on any Linux distribution, and if
so, what version of cctools, gcc, etc, were used. Thanks in advance,
Adam
P.S. I should mention that I have been able to successfully compile
the FSF version of gcc-3.4.3 on x86 using odcctools, although when
attempting to cross-compile from Xcode using distcc, I get errors
regarding Apple-specific compiler flags, such as:
cc1obj: error: unrecognized command line option "-arch"
cc1obj: error: unrecognized command line option "-fpascal-strings"
cc1obj: error: unrecognized command line option "-ffix-and-continue"
cc1obj: error: unrecognized command line option "-fpch-preprocess"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden