gcc-m68k-linux-gnu-11.2.1However, I ran into a problem. For one of my small "bare metal" projects I was compiling some C code that did division and modulo as part of a routine to convert an integer value to a string. This code as getting an m68k "address error" exception. I tracked this down to the modsi3 function which is part of "libgcc". It looks to me like the libgcc that ships with the compiler built by Fedora has only a libgcc that is for the mc68020 or such processor and is using instructions that give the plain old mc68000 indigestion.
The answer of course is to find a gcc that is suitable for the mc68000. I really have two options. One is to rebuild gcc with "multilib" support so there are a variety of different libgcc available. The other is to find the source for libgcc and build it off to the side myself, or at least part of libgcc which includes these routines.
I have source for gcc from all through history on my machine. Two candidates for what I am looking for are:
gcc-2.95.3/gcc/config/m68k/lb1sf68.asm gcc-4.7.2/libgcc/config/m68k/lb1sf68.S
This works just fine and solves my problem.
Tom's Computer Info / [email protected]