[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ support
- Date: Wed, 24 Feb 1999 15:31:19 -0800
- From: erik.ivanenko at utoronto.ca (erik.ivanenko)
- Subject: C++ support
Ian Lance Taylor wrote:
> Date: Wed, 24 Feb 1999 11:19:45 -0600 (CST)
> From: <joel at oarcorp.com>
>
> I have helped Erik to the limits of my C++ ability. Could someone pitch
> in? :)
>
> On Wed, 24 Feb 1999, erik.ivanenko wrote:
>
> > /home/cross-19980909/egcs-1.1b-binutils-2.9.1.0.10-newlib-1.8.0/i386-rtems/bin/i386-rtems-gcc
>
> If you want to use the C++ libraries, link with g++, not gcc.
>
> > Obvoiusly, a library is missing. This would be libg++.a I suppose. Is it not built due to the
> > missing enable-cxx in user.cfg?
>
> libg++.a is obsolete. The current C++ library is named libstdc++.a.
> If you use g++ to link, it will link against libstdc++.a
> automatically. Or you can link with gcc and add -lstdc++ yourself.
>
> Ian
Thank you very much!
I made a "make-cxx-exe" define in i386ex.cfg by simply replacing gcc in "make-exe" with g++. It now
links just fine.
printf still hangs when called in the first constructor, so I replaced all printf's with printk ( and
%p with 0x%x).
The printf's that print the banners were also replaced, otherwise, the output is improperly sequenced.
I did check the contents of the cdtest.scn against my output, and it agrees except for the value of
"this", which I find quite odd:
Hey I'm in base class constructor number 1 for 0x964.
Hey I'm in base class constructor number 2 for 0x96C.
Hey I'm in derived class constructor number 3 for 0x96C.
*** CONSTRUCTOR/DESTRUCTOR TEST ***
Hey I'm in base class constructor number 4 for 0x3FA814.
Hey I'm in base class constructor number 5 for 0x3FA80C.
Hey I'm in base class constructor number 6 for 0x3FA804.
Hey I'm in base class constructor number 7 for 0x3FA7FC.
Hey I'm in derived class constructor number 8 for 0x3FA7FC.
IO Stream not tested
Hey I'm in derived class destructor number 8 for 0x3FA7FC.
Derived class - Instantiation order 8
Hey I'm in base class destructor number 7 for 0x3FA7FC.
Instantiation order 8
Hey I'm in base class destructor number 6 for 0x3FA804.
Instantiation order 6
Hey I'm in base class destructor number 5 for 0x3FA80C.
Instantiation order 5
Hey I'm in base class destructor number 4 for 0x3FA814.
Instantiation order 5
*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***
Hey I'm in derived class destructor number 3 for 0x96C.
Derived class - Instantiation order 3
Hey I'm in base class destructor number 2 for 0x96C.
Instantiation order 3
Hey I'm in base class destructor number 1 for 0x964.
Instantiation order 1
The i386ex BSP leaves it's text section in ROM. Hence, the addresses in high memory ( above 0x3F80000
) are in flash ROM. The low addresses are found in RAM. Should I be concerned about the references to
flash? ie. is this OK?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcard.vcf
Type: text/x-vcard
Size: 291 bytes
Desc: Card for Erik Ivanenko
Url : http://rtems.rtems.org/pipermail/rtems-users/attachments/19990224/530bd1b0/attachment.vcf