This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add --enable-__cxa_atexit


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]