[Coco] C compiler self-hosting on NitrOS9 again!
Walter Zambotti
zambotti at iinet.net.au
Tue May 5 02:35:52 EDT 2020
I too have an OS9 C compiler on git hub.
It produces byte for byte identical code as the tandy/microware one pass
compiler.
I have added ansifront and cc253 as well. So a complete OS9 C cross
compiler tool chain!
https://github.com/WallyZambotti/Nitros9-CC-CrossCompiler
This one does compile on Linux (and mingw with known issues).
I'm looking forward to Deek's version as the source will be better
maintained and documented.
Walter
On 4/5/20 10:00 pm, Bill Pierce via Coco wrote:
> I assume this compiler runs under OS-9/NitrOS9. Why noy present it as OS-9 code on OS-9 formatted disk images ready to be copied to one's HD?
> I will move it to my NitrOS9 development system and give it the MShell test... So far, only my compiler system and the original Tandy/MW compiler (not quite as optimized) can compile it. I've tried many. The most common failures are the inclusion of C.Prep19b/c and certain versions of C.comp, most of which are buffer size failures, label count failures and line length failures. The MShell sources uses a LOT of labels, some extremely long lines and requires plenty of buffer space when compiling most large modules.
> I'll give it a try and see how it does.
> Bill P.
>
>
> -----Original Message-----
> From: Jeff Teunissen <deek at d2dc.net>
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Sent: Sun, May 3, 2020 11:36 pm
> Subject: [Coco] C compiler self-hosting on NitrOS9 again!
>
> Some of you know I've been hacking on the "C3" compiler that's been
> bouncing around, and anyone else who's played with it knows that it
> doesn't really work right.
>
> Well, it does now. :)
>
> In the "CoCo C" repository on GitHub is a K&R C preprocessor and
> compiler that can be built (in a multi-stage process requiring the old
> Tandy compiler to start from), that is also capable of compiling its
> own code, so we can produce a new version of the compiler by using its
> own code.
>
> The code it produces is slightly more efficient than that produced by
> the Tandy compiler, so as far as I can tell will almost always produce
> smaller binaries.
>
> Note: the code _also_ compiles on modern x86 systems, but the
> resulting binaries don't produce working code -- there are endianness
> problems that need tracking down before it will be a good
> cross-compiler. If anyone locates the code that's producing the
> errors, let me know. :)
>
> It's available at <https://github.com/Deek/CoCoC>.
>
More information about the Coco
mailing list