avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] C++/ATmega128 support for gcc-3.0.3


From: reinhard . jessich
Subject: Re: [avr-gcc-list] C++/ATmega128 support for gcc-3.0.3
Date: Tue, 5 Feb 2002 20:29:59 +0100

On Tue, 05 Feb 2002, Peter Jansen wrote:
> 
> Hi All,
> 
> Attached is a patch for gcc-3.0.3 with all the ATmeg128 stuff in it and
> the C++ stuff in it.
It seems that you have used my idea to inhibit the building of libstdc++
and libiberty. You have also added my patch with the zero length name of
libstdc++. Thank you for using this, but it was a quick hack. I am not sure if
you get this approved by the gcc developers. I think they plan to use libstdc++
for any target. Anyway, we will see it.

> The destructor function run the destructors in the wrong direction, does
> anyone have any ideas on how to fix it in libgcc.S? would anyone ever
> use the destructors on an embedded system?
Are the changes in libgcc.S compatible for all processor types?

You have enabled the con/destructor execution functions for the AVR_MEGA only.
I think it is possible to use C++ for smaller processors also.

Are you sure that the constructors are executed in the right order?
As far as I remember you have to execute the constructor list in the reverse
order. So you should start with the end of the list. Have a look to
gcc-3.0.2/gcc/config/m68hc11/larith.asm. You will see that the constructors are
executed in reverse order and the destructors in normal order.

Try an example with a class B derived from class A and define a global variable
of type B. Then add for each class a constructor and a destructor.
The constructor of base class A must be executed befor the constructor of class
B. The destructor of class B must be called before the destructor of class A.

> Can we get this into gcc-3.0.4 which is due to released 15 Feb?
It would be fine to enable C++ for other processors also.

What about the changes in binutils and avr-libc? I mean the new linker scripts
and the changed startup file.

Thank you for your work!

Regards,
    Reinhard

-- 
 Ing. Reinhard Jessich              mailto: address@hidden
 A-1190 Vienna, Goergengasse 2/2/1  phone: +43/1/3692600
 http://members.telering.at/jessich mobile: +43/664/1735439
avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]