This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add --enable-__cxa_atexit
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: Jack Howarth <howarth at bromo dot med dot uc dot edu>, Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 6 Jun 2002 19:06:30 +0200
- Subject: Re: PATCH: Add --enable-__cxa_atexit
- References: <200206061658.MAA10870@bromo.msbb.uc.edu> <20020606100226.A30990@lucon.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 06, 2002 at 10:02:26AM -0700, H . J . Lu wrote:
> 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. */
Except that all such comments are very misleading, because
DEFAULT_USE_CXA_ATEXIT are not about whether it should use __cxa_atexit,
rather than atexit, but actually whether it should use __cxa_atexit
rather than DT_FINI/DT_FINI_ARRAY. It could use atexit the same way
as __cxa_atexit.
Jakub