This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Succes using crosstool on Mac OS X


Hello,

I managed to build a working crossgcc toolchain targeting powerpc-750-linux-gnu on Mac OS X 10.3.2, by running demo-ppc750.sh of Dan Kegel's crosstool 0.27 (http://kegel.com/crosstool/) (Thanks, Dan, and feel free to add my linux patch to crosstool!).

First I used fink to install cvs, rsync, libtool14, fileutils, gawk, sed, and wget.

Then I saw that linux requires a patch to compile, because "expr" on Mac OS X is not GNU expr:
http://in3www.epfl.ch/~schaffne/fix-expr-2.4.ptch


Finally, when crosstool wants to install the glibc headers, it unfortunately tries to compile glibc with the platform's native toolchain. Glibc's configure script does "as --version", which is not understood by Apple's assembler, which then waits for a file to compile on standard input, which stalls everything.

I solved that problem by first creating a cross-compiler called "/tools/bin/powerpc-750-linux-gnu-gcc", and changing crosstool.sh like this: Where ${GLIBC_DIR}/configure is invoked, I removed CC=gcc, and appended --with-binutils=/tools/bin.

To create the first cross-compiler, I more or less followed chapter 5 of the book "linux from scratch", up to the section "Installing GCC-3.3.1 Pass 1". I appended the target directive to the binutils configure invocation, and to compile gcc, I first applied (to gcc-3.3.2):
http://vserver.13thfloor.at/Stuff/Cross/gcc-3.3.2-cross-powerpc- fix.diff.bz2
Configuration: ../gcc-3.3.2/configure --target=powerpc-750-linux-gnu --disable-nls --enable-languages=c --disable-threads --disable-shared --disable-checking --prefix=/tools --with-local-prefix=/tools/powerpc-750-linux-gnu


I actually continued following the book up to "Locking in Glibc", but this didn't gave me a functional shared compiler (was missing crt1.o, /lib/libc.5.so, or main), and this is probably not necessary to get crosstool to work.

Martin


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]