Files to download:
Let's compile (Follow the FAQ!)
After gunzip-ing and untar-ing, apply the crossgcc patch:cd gcc-2.8.1 patch -p1 <../crossgcc-gcc-2.8.1.patch cd ..Then run the one-tree script (from Cygnus):
chmod +x one-tree-1.5.sh ./one-tree-1.5.shNow compile and install binutils, gcc, and newlib:
host=sparc-sun-solaris2.6 target=m68k-coff prefix=/opt/depot/m68k-coff-gcc-2.8.1 mkdir build cd build CC=gcc ../src/configure --host=$host --target=$target --prefix=$prefix make all info CC=gcc make install install-info cd ..Note that we're running the bash shell.
Now what?
The cross compiler and libraries are at the path $prefix.
Add $prefix/bin to your path, and you can access the compiler (and other tools) as:
m68k-coff-gcc m68k-coff-as m68k-coff-ar m68k-coff-ld m68k-coff-objdump m68k-coff-objcopy (etc...)
Since I am targetting an MC68332, I have to be sure and add the options
-mc68000 -msoft-float -Wa,-mcpu32
The compiler will never generate any special CPU32 instructions, so you have to embed assembly in your C functions (or write in assembly) to use them. The last option up there tells the assembler that it can use the CPU32 instruction set. (Without it, you'll get assembly-time errors.)
For more information contact: Greg Allen <gallen@arlut.utexas.edu>
$Id: BuildingGCC-m68k.html,v 1.1 1999/09/10 23:07:45 gallen Exp $