This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
why debian uses --use-cxa-atexit
- From: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 1 Jun 2002 19:21:20 -0400 (EDT)
- Subject: why debian uses --use-cxa-atexit
I've gone back through the debian-gcc mailing list and found
the origin of debian using --use-cxa-atexit in their gcc 3.x
compiler builds. It is in the thread starting with...
http://lists.debian.org/debian-gcc/2001/debian-gcc-200106/msg00126.html
which basically says that they are using --use-cxa-atexit because
global destructors are not run in the correct order. They got this
from http://gcc.gnu.org/bugs.html#known which has...
Global destructors are not run in the correct order.
Global destructors should be run in the reverse order of their constructors completing. In most cases this is the same as the reverse order of constructors starting, but sometimes it is different, and that is important. You need to compile and link your programs with --use-cxa-atexit. We have not turned this switch on by default, as it requires a cxa aware runtime library (libc, glibc, or equivalent).
Is this information still accurate for gcc 3.1? It would seem this is the
only reason debian is using --use-cxa-atexit. Thanks for any clarifications.
Jack