[Coco] MW-C Cross compiler bug - Solved

Bill Pierce ooogalapasooo at aol.com
Fri Mar 7 14:25:16 EST 2014


Luis,
I just type "make" on my compiler. That's the whole idea behind a good C compiler.
Any simple error in C code (missing ";" or "." instead of "," etc) can cause a cascade of errors as the whole compilation is then out of sync. I have to break up the files into smaller (abo 42k) sources but can do unlimited multi-source files. That's the beauty of the MJK C Compiler system. It was designed to handle multi-source compiles as well as multi-module compiles.
I have one set of sources that consists of about 122 sources compiling into 12 seperate modules by just typing "make"
Of course this is Tim Koonze's "make" and not standard MW make. It allows more control, similar to the makefiles in the NitrOS9 repo. Much more involved than the one Tandy shipped with the C Compiler set. The compiler also uses a special "front end" named "rcr", written by Mike Knudesen that allows the use of a ramdisk (this speeds up "real" Coco compiles), c.comp instead of c.pass1 & c.pass2, the newer c.opt, Willard's c.prep.19b, RMA & RLink.  The above 122 files compiled on a real Coco would take over an hour to compile, on overclocked VCC it takes about 1 minute (or less).

I'll post later as to the differences (if any) in C code for the OS9 compiler and the crosss-compiler as I'll try one of my source sets on it. I know I'll probably have to redo the makefiles if nothing else. I'll also be working in MinGW so I may have to play around with that to get it to work with the compiler as well :-(


Bill Pierce
"Today is a good day... I woke up" - Ritchie Havens
 

My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Webmaster of The TRS-80 Color Computer Archive
http://www.colorcomputerarchive.com/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com




-----Original Message-----
From: Luis Antoniosi (CoCoDemus) <retrocanada76 at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Fri, Mar 7, 2014 1:42 pm
Subject: Re: [Coco] MW-C Cross compiler bug - Solved


Can't tell you because i've never developed in C for coco before.

The cross-c compiler allows you much larger files to compile, and you
just have to type make on pc. looking the error log on vcc coco is a
problem.

But this cross compiler generates tons of errors when it get one...


On Fri, Mar 7, 2014 at 1:37 PM, Bill Pierce <ooogalapasooo at aol.com> wrote:
>
> Luis,
> That's cool. The last I heard, the only C cross-compiler for Coco would not do 
position independant code and was only good for RSDOS programs.
> I'm glad to see ypou got it going. I will be playig with this for sure.
> But to be honest, I'm really happy with using my MJK C Compiler system on VCC 
at overclocked speeds, though if the cross-compiler has a better feature set, I 
may be changing over soon.
>
> Is there much (if any) difference in code for the compiler compared to 
standard MW OS9 C code? Or does it need a lot of code change to compile a file 
written for the OS9 compiler?
>
> Thanks for the link :-)
>
>
> Bill Pierce
> "Today is a good day... I woke up" - Ritchie Havens
>
>
> My Music from the Tandy/Radio Shack Color Computer 2 & 3
> https://sites.google.com/site/dabarnstudio/
> Co-Webmaster of The TRS-80 Color Computer Archive
> http://www.colorcomputerarchive.com/
> Co-Contributor, Co-Editor for CocoPedia
> http://www.cocopedia.com/wiki/index.php/Main_Page
> E-Mail: ooogalapasooo at aol.com
>
>
>
>
> -----Original Message-----
> From: Luis Antoniosi (CoCoDemus) <retrocanada76 at gmail.com>
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Sent: Fri, Mar 7, 2014 8:15 am
> Subject: Re: [Coco] MW-C Cross compiler bug - Solved
>
>
> Sure it does. I'm doing an OS-9 app for my WordPak2+
>
> http://www.colorcomputerarchive.com/coco/Programming/OS-9%206809%20C%20Crossc-Compiler%20Sources/
>
> The binaries are for linux, but you can build it on windows using
> cygwin or mingw. Just don't do "make clean" otherwise it will erase
> the prototypes.h, or change the makefiles to not delete it. You need
> to copy or link the dd dir to /dd.
>
> Also you will need rlink and rma. I got them from an old toolshed 2.0
> binary build on the net. And don't forget my "sed" change on it.
>
> On Fri, Mar 7, 2014 at 12:32 AM, Bill Pierce <ooogalapasooo at aol.com> wrote:
>>
>> Does this cross-compiler do position independant OS9 code? If so, let's see a
> link :-)
>>
>>
>> Bill Pierce
>> "Today is a good day... I woke up" - Ritchie Havens
>>
>>
>> My Music from the Tandy/Radio Shack Color Computer 2 & 3
>> https://sites.google.com/site/dabarnstudio/
>> Co-Webmaster of The TRS-80 Color Computer Archive
>> http://www.colorcomputerarchive.com/
>> Co-Contributor, Co-Editor for CocoPedia
>> http://www.cocopedia.com/wiki/index.php/Main_Page
>> E-Mail: ooogalapasooo at aol.com
>>
>>
>>
>>
>> -----Original Message-----
>> From: Luis Antoniosi (CoCoDemus) <retrocanada76 at gmail.com>
>> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
>> Sent: Thu, Mar 6, 2014 11:43 pm
>> Subject: [Coco] MW-C Cross compiler bug - Solved
>>
>>
>> Hi all,
>>
>> I'm using the C cross compiler on linux and I found a strange and
>> annoying bug all the time it kinda messed up with the variable names
>> and I had to put (int) and other parenthesis in order to avoid those
>> bugs. The they appeared completely in an arbitrary fashion with no
>> defined pattern so far. I had to type a line and try to compile...
>>
>> I was about to ditch this freaking compiler when I found the culprit:
>> the coprep doesn't like any indentation at all. The solution was
>> adding a small preprocessor before the C preprocessor.
>>
>> So you change the cc file into:
>>
>> echo "Preprocess.."
>> sed 's/^[ \t]*//' $1 > $name.ns
>> coprep $name.ns > $name.m
>> [ $? = 0 ] || exit 1
>> rm $name.ns
>>
>> The sed 's/^[ \t]*//' $1 > $name.ns will strip all leading spaces and
>> tabs and the coprep will happily preprocess your C code.
>>
>> Now I can keep coding in peace...
>>
>> --
>> Long live the CoCo
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>>
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
>
>
> --
> Long live the CoCo
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



-- 
Long live the CoCo

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 



More information about the Coco mailing list