[gccsdk] GCCSDK GCC 4 status update

Graham Shaw gdshaw at sagitta.demon.co.uk
Thu May 31 23:09:37 PDT 2007


In article <51c3d0eb4e.Jo at hobbes.bass-software.com>,
   John Tytgat <John.Tytgat at aaug.net> wrote:
> In message <0ef6cdeb4e.druck at druck.freeuk.net>
>           "David J. Ruck" <druck at druck.org.uk> wrote:

> > > - We have module support for C programs fully working (including ELF
> > >   based CMunge).  C++ support has some oddities which I don't fully
> > >   understand what's going on and what a solution could be.  If
> > >   someone feels challenged by this, by all means, talk to me and
> > >   have go.
> > 
> > Well CFront had some nasty bug involving static initialisers (I forget 
> > the exact details). I got away with writing one C++ module and thought 
> > better of it after that. I don't expect people rushed out to build G++ 
> > modules when it became possible, so its not urgent, but would be nice 
> > to have eventually.

> Actually since GCCSDK 3.4.5 Release 1 (15 Feb 2006) you can build C++
> modules surpasing Norcroft here.  Not sure to what extend it got used
> but recently C++ rar (?) based module for SparkFS was discussed in
> dpilling's mailing list I believe.

My Filer, ClaimASWI and thread manager modules were written/are being
written mostly in C++, with some success.

You have to be /very/ careful not to let the executable size spiral out of
control, especially if the module would otherwise be a small one.  Mostly
that means not pulling in the RTTI or exception handling code; that isn't
quite as easy as it sounds, but with care it is possible to produce a C++
module which is not much larger than if it had been written in C.

I'll do a write-up of this when I have a bit more experience, but if
anyone is planning to do something similar I'd be most happy to talk
through what I've found so far.

I am having some difficulty reliably launching a module-based application
written in C++, but as yet haven't determined whether it is me, g++,
libscl or the SCL itself which is to blame.  (If anyone else has done this
successfully I'd be interested to know.)

-- 
Graham Shaw (http://www.sagitta.demon.co.uk/graham/)
The RISC OS Packaging Project (http://www.riscpkg.org/)
The RISC OS Toolkit (http://rtk.riscos.org.uk/)




More information about the gcc mailing list