[Coco] Gcc Cross compiler Win32 host - Progress.
John E. Malmberg
malmberg at Encompasserve.org
Tue Nov 11 07:56:00 EST 2003
David wrote:
> John,
>
> More replies to your log.
>>I now am hitting the expected error in building libgcc.a for mode
>>DF. Not sure about how to fix that. It appears that for some
>>reason this did not get defined.
>
> I believe this is where the libgcc.a is needed. DF is double float, and
> it isn't defined. This could be done as an RTL, I don't know.
The error is that the compiler needs to know the size attributes of
double type so that it knows how many bytes to place on the stack. This
is defined in one of the *6809* files.
Once that is done, then probably a custom libgcc2.c will probably be
needed to supply the floating point routines.
I have been looking at the documentation for GCC and source of the other
platforms, and I have not found out how the DF "mode" as the compiler
calls it is generated.
I may have to go backwards from the generated file that is missing the
definition, and figure out what tool is used to generate it.
The attributes for the internal types are represented by something
similar to an internal compiler __mode__(xxxx) directive.
This is the same way that a direct page attribute would be implemented,
in the *6809* file, you define the instructions that are generated for
accessing a direct page value. But the __mode__(direct_page) or
equivalent, would also have to have a way to specif
>
>>So hopefully at this point I have a working cross compiler.
>
> If you want to try it out, take a short test c source file (write
> something if you don't have anything short), and try gcc09 -S -I
> <wherever your coco headers are> testfile.c
>
> Note that if you haven't already done that, to get it to compile, you
> need to copy some of your coco headers over onto your system. I just
> made a directory coco/defs in my home directory and copied all my defs
> directory into that.
>
> You should get an .o file that you can list out and see what it's doing.
Actually you get a .s file, and for the very small program that I did,
the .s file has the correct assembly code.
But first I had to move some more .exe files into the CYGWIN .bin directory.
The assembler however is not able to interpret the code at all. It is
complaining that every token on line is unrecognized. So it appears
that some work there is needed. It does not even recognize the comments.
But if all that is needed is to write a simple cross assembler, then
that will not be to hard.
> BTW, in your original post, you stated that you were limited in your
> editor because of the CR-LF problem. You can use Boisy's u2d, d2u
> utilities to convert them back and forth. One other thing. Don't know
> if this applies to cygwin or not, but mingw has two versions of make,
> one for something and another for general compiles.
I am not limited in the CR-LF problem. Some of the Microsoft Windows
tools can handle either format. Notepad is one that can not. wordpad,
otherwise known as write can handle just about any text format with out
conversion. There are also a few editors in the cygwin suite.
The use of write/wordpad will allow non-programming Windows users to
have an easy to use simple editor. Either write or wordpad is available
on all versions of Microsoft Windows. The name changes based on the
version of Microsoft Windows.
-John
wb8tyw at qsl.net
Personal Opinion Only
More information about the Coco
mailing list