Cross compile build problems

Brian Rose
Sun Sep 26 01:26:00 GMT 2004

I am trying to put together some GNU tools for embedded development. We are
working on a Motorola coldfire 5206e (among others) and I'd like to use
non-commercial tools for development. The target is a microcontroller
without an OS.

I am on a WindowsXP system with the Cygwin library installed. I am using
the following process to build the tools. All of this is done in my
/cygwin/home/brose directory

1) Download the source tarballs into coldfire/archive
2) Extract the sources into coldfire/src
3) Build and install binutils (works fine) like this
     cd $HOME/coldfire
     mkdir builds
     mkdir builds/binutils
     mkdir bins
     mkdir bins/binutils
     cd builds/binutils
     ../../src/binutils-2.15/configure --target=m68k-elf
--prefix=$HOME/coldfire/bins/binutils/ -v
     make all install

4) Attempt to build and install gcc like this
     cd $HOME/coldfire
     mkdir builds/gcc
     mkdir bins/gcc
     cd builds/gcc
     ../../src/gcc-3.4.2/configure --target=m68k-elf
--prefix=$HOME/coldfire/bins/gcc/ -v
     make all install

And I get this...

-B/home/brose/coldfire/tools/bins/gcc//m68k-elf/lib/ -isystem
/home/brose/coldfire/tools/bins/gcc//m68k-elf/include -isystem
/home/brose/coldfire/tools/bins/gcc//m68k-elf/sys-include -O2 -DIN_GCC
-DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
-I../../../src/gcc-3.4.2/gcc -I../../../src/gcc-3.4.2/gcc/.
-I../../../src/gcc-3.4.2/gcc/../include   -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-unit-at-a-time  \
   -Dinhibit_libc -c ../../../src/gcc-3.4.2/gcc/crtstuff.c -DCRT_BEGIN \
   -o crtbegin.o
as: unrecognized option `-mc68020'
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/home/brose/coldfire/tools/build/gcc/gcc'
make: *** [all-gcc] Error 2

I've tried the --with-as=$HOME/coldfire/tools/bins/bintuils/bin/m68k-elf-as 
with no luck.

Has anyone built the current compiler on/for Windows with a m68k target in 
mind? Pray tell, what was the procedure?

Thanks in advance,


Brian Rose

More information about the Gcc-help mailing list