Libgloss and stdio
Jeffrey A. Webb
Fri Jun 27 22:44:00 GMT 1997
Stefan, Rob, Mark, Ng,
Thanks for the help, guys. I was about to give up on getting stdio to
work, but thanks to your support, I kept trudging through the code and
was able to find the error.
The main problem was that I am using a 68008 processor, and gcc was
compiling for a 68020(?) by default. Most code ran fine, but when
dealing with some signed char variables, the EXTB.L instruction was
used, which is not supported on the 68008. This was causing my program
to hang in some situations, but not in others. Once I discovered this,
the main problem was trying to get newlib and libgloss compiled using
only 68000 instructions. I had to change some stuff in the makefiles
because for some reason I could not pass the -m68000 option from the top
level makefile down to the /libgloss/m68k directory where the outbyte
function resides. The files in the /libgloss directory compiled fine
with the option passed from the top-level makefile. I had to add the
CFLAGS_FOR_TARGET = @CFLAGS@
to the file: libgloss/m68k/Makefile.in to get the option passed.
I have a couple of questions. What is the correct way to install gcc
(libgcc, newlib, libgloss, etc.) for my 68008 system, so that the
libraries will be compiled correctly? It seems to be working now, but I
want to make sure I have everything right. Also, what does the
m68k-coff option compile for by default? It's obviously not the m68000.
Thanks again for your help.
More information about the crossgcc