68000 cross compiler with newlib problems

rcanup@hal-pc.org rcanup@hal-pc.org
Sat Mar 22 23:15:00 GMT 2014

Attempting to build a 68000 cross compiler with newlib-2.0.0. 
binutils-2.24, gcc-4.3.4  (I have tried many different versions of all 
of these with similar errors - these are just what I am trying now) the 
OS is Ubuntu 13.10, the 64 bit current Ubuntu system.

The build flags for the newlib configuration were: " 
../newlib-2.0.0/configure --target=m68k-elf 

The 2.0.0 version of newlib gets the closest to working of any version 
of newlib I have tried; 2.1.0 has this same error plus a plethora of 
others. If I can get 2.0.0 to work -  I'll list the 2.1.0 errors as I go 
along with the process of building in the future.

The problem appears to be that the newlib 'makefile' is calling my 
bootstrap 'm68k-elf-gcc' with "-mcpu=68000" (It is in the command line 
twice) - which is not a legal command switch for the 68000 version of 
gcc according to the gcc man page, When 'm68k-elf-gcc' calls the 
'm68k-elf-as' assembler, the assembler blows up with the Error message:

Error: unrecognized architecture specification `cpu=68000'

(See last line of  listing. )

Does anyone know where to change something before the configuration of 
newlib 2.0.0 to prevent this small error?

Here is an output snipet from a 'make all' run in my build_newlib 
sub-directory (next to newlib-2.0.0 in my '/home/bob/68kcross' 
directory) - showing the error:

m68k-elf-gcc -B/home/bob/68kcross/build_newlib/m68k-elf/m68000/newlib/ 
-isystem /home/bob/68kcross/newlib-2.0.0/newlib/libc/include 
-L/home/bob/68kcross/newlib-2.0.0/libgloss/m68k  -mcpu=68000 
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" 
-DPACKAGE_VERSION=\"2.0.0\" -DPACKAGE_STRING=\"newlib\ 2.0.0\" 
-DMISSING_SYSCALL_NAMES -fno-builtin   -g -O2  -mcpu=68000 -c -o 
lib_a-setjmp.o `test -f 'setjmp.S' || echo 
Assembler messages:
Error: unrecognized architecture specification `cpu=68000'

More information about the Newlib mailing list