Sunfish with GCC

John Tytgat John.Tytgat at aaug.net
Thu Jun 30 17:10:56 PDT 2005


In message <2a70bc724d.peter at chocky.org>
          Peter Naulls <peter at chocky.org> wrote:

> After spending some time improving libscl, I've managed to build Sunfish
> with GCC.  And although it loads, it's broken, giving an abort on
> something as simple as "*help sunfish".  I tried without optimisation to
> check, and it's not that.
> 
> I haven't looked at the broken code yet, but I've put up what I have:
> 
> http://www.riscos.info/sunfish-gcc.zip
> 
> You should be able to rebuild this yourself if you obtain TCPIPLibs and
> OSLib/OSLibSupport.

I did some investigation : the PIC register was also used for referencing
function names and although this isn't most common C code, it is for
modules & FS implementations.  I've commited a fix for this and I can
build a working Sunfish.  Using GCC's -O3 and all sources specified in
its command line so global optimsation can be done and a lot of time, 
it ends up as a 237 KByte module (the official v1.07 release is 187 KByte
big).

> For reference, I've changed the following:
> 
> Updated Makefile

Did this.

> Removal of "##" in the headers, which GCC 3.4 objects to unless used in
> specific circumstances
> Addition of "LL" onto some 64-bit literals.

Probably fixed in the v1.07 release because I didn't had to do those
two things.  Or maybe I was using more relaxing compiler settings ?

> #undef vsnprintf in a couple of places to avoid linking errors (I need
> to fix this properly)

Yes, this is annoying.  Suggestions welcome.

> You will of course also need the latest changes I've made to CVS too.

And mine. ;-)

I believe I also built a working JetDirectFS module (http://www.sbellon.de/)
but that needs confirmation by Stefan.  His RemotePrinterFS module however
crashes during module initialisation (or maybe service call).  So that
needs more investigation. :-/

Any other module src suggestions for smoke testing the GCC module support ?

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven



More information about the gcc mailing list