This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add --enable-__cxa_atexit
- From: "H . J . Lu" <hjl at lucon dot org>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 6 Jun 2002 10:02:26 -0700
- Subject: Re: PATCH: Add --enable-__cxa_atexit
- References: <200206061658.MAA10870@bromo.msbb.uc.edu>
On Thu, Jun 06, 2002 at 12:58:51PM -0400, Jack Howarth wrote:
> Mark,
> So then you accept HJ Lu's patch with the removal of the section
> which builds libstdc++v3 with -fno-use-cxa-atexit? I also wonder if
> we shouldn't have the default for --enable-use__cxa_atexit set to
> yes? You seem to be saying that using -fno-use-cxa-atexit will lead
I don't think it will work since __cxa_atexit is only available in
glibc 2.2. I can't even enable it for Linux by default. But I am
using this local change for my build.
H.J.
----
2002-06-03 H.J. Lu (hjl@gnu.org)
* config/linux.h (DEFAULT_USE_CXA_ATEXIT): Define as 1.
--- gcc/config/linux.h.order Mon Jan 7 09:34:23 2002
+++ gcc/config/linux.h Mon Jun 3 17:40:20 2002
@@ -110,3 +110,8 @@ Boston, MA 02111-1307, USA. */
/* Define this so we can compile MS code for use with WINE. */
#define HANDLE_PRAGMA_PACK_PUSH_POP
+
+/* Use __cxa_atexit, rather than atexit, to register C++ destructors
+ for local statics and global objects. */
+#undef DEFAULT_USE_CXA_ATEXIT
+#define DEFAULT_USE_CXA_ATEXIT 1