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

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

Re: [avr-gcc-list] [Fwd: building gcc/g++]


From: Peter Jansen
Subject: Re: [avr-gcc-list] [Fwd: building gcc/g++]
Date: Wed, 09 Jan 2002 19:02:11 +1100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2

Hi,

I did a little mistake with my patches. Now I can build avr-g++ without having
to deal with newlib and libstdc++. They are simply not build.
The patches are for gcc-3.0.2. Attached you will find them. I think they can
be sent to the gcc team, but I haven't done it until now, because of the
following problem.

After writing a small c++ test program, simulating it in simulavr and analysing
the generated asm file, I discovered that nobody is calling the
con/destructors of global variables.

I have found the __CTOR_LIST__ in the asm output.

Is anybody working on a solution of this problem?


Yes we have just come across this problem, today we have fixed g++ to make this all work om the mega128 (which is what we are using).

It required the following fixes,

1. Put the con/destructor table in .ctors/.dtors sections, and make the linker script handle them.

2. Write a do_global_constructors function.

3. Call the do_global_constructors from the startup code.

I'm quite busy at the moment, but I will try and make patches for this, I still have to do something for the other avr's (unless you would like to)

I have posted patches for the ATmega128 for the above sources if you want ATmega128 support. Some of this support is already built into the CVS trees for gcc, binutils already for those who like like on the edge.


Maybe you can send me the patches. Then I will integrae them into my build

script.

here are the two messages to avr-gcc-list with the 3.0.2 patches for the mega128 support, these wont patch againsed the current CVS tree I don't think.

http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001048.html
http://avr.jpk.co.nz/pipermail/avr-gcc-list/2001-November/001049.html

When I finish the constructor/destructor stuff, Ill get the latest CVS source update the patches and send them to the gcc/binutils maintainers.

The stuff for avr-libc is already in the latest avr-libc for the ATmega128 at

http://www.amelek.gda.pl/avr/libc/

Regards,

--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW       1430
AUSTRALIA


avr-gcc-list at http://avr1.org



reply via email to

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