Commit 4bafaa6f by H.J. Lu Committed by H.J. Lu

configure.in: Add --enable-__cxa_atexit.

2002-06-07  H.J. Lu  (hjl@gnu.org)

	* configure.in: Add --enable-__cxa_atexit.
	* configure: Regenerated.
	* config.in: Likewise.

	* defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if
	not defined.

2002-06-07  H.J. Lu  (hjl@gnu.org)

	* decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.

From-SVN: r54345
parent caef5b46
2002-06-07 H.J. Lu (hjl@gnu.org)
* configure.in: Add --enable-__cxa_atexit.
* configure: Regenerated.
* config.in: Likewise.
* defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if
not defined.
2002-06-07 Gabriel Dos Reis <gdr@merlin.nerim.net> 2002-06-07 Gabriel Dos Reis <gdr@merlin.nerim.net>
* diagnostic.c (diagnostic_build_prefix): Fix initialization. * diagnostic.c (diagnostic_build_prefix): Fix initialization.
......
...@@ -307,6 +307,12 @@ ...@@ -307,6 +307,12 @@
every opportunity. This is extremely expensive. */ every opportunity. This is extremely expensive. */
#undef ENABLE_GC_ALWAYS_COLLECT #undef ENABLE_GC_ALWAYS_COLLECT
/* Define if you want to use __cxa_atexit, rather than atexit, to
register C++ destructors for local statics and global objects.
This is essential for fully standards-compliant handling of
destructors, but requires __cxa_atexit in libc. */
#undef DEFAULT_USE_CXA_ATEXIT
/* Define if you want the C and C++ compilers to support multibyte /* Define if you want the C and C++ compilers to support multibyte
character sets for source code. */ character sets for source code. */
#undef MULTIBYTE_CHARS #undef MULTIBYTE_CHARS
......
...@@ -264,6 +264,18 @@ elif test x$withval != xno; then ...@@ -264,6 +264,18 @@ elif test x$withval != xno; then
cpp_install_dir=$withval cpp_install_dir=$withval
fi]) fi])
# Enable __cxa_atexit for C++.
AC_ARG_ENABLE(__cxa_atexit,
[ --enable-__cxa_atexit enable __cxa_atexit for C++],
[], [])
if test x$enable___cxa_atexit = xyes; then
AC_DEFINE(DEFAULT_USE_CXA_ATEXIT, 1,
[Define if you want to use __cxa_atexit, rather than atexit, to
register C++ destructors for local statics and global objects.
This is essential for fully standards-compliant handling of
destructors, but requires __cxa_atexit in libc.])
fi
# Enable Multibyte Characters for C/C++ # Enable Multibyte Characters for C/C++
AC_ARG_ENABLE(c-mbchar, AC_ARG_ENABLE(c-mbchar,
[ --enable-c-mbchar enable multibyte characters for C and C++], [ --enable-c-mbchar enable multibyte characters for C and C++],
......
2002-06-07 H.J. Lu (hjl@gnu.org)
* decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
* error.c (cp_error_at): Fix typo. * error.c (cp_error_at): Fix typo.
......
...@@ -362,7 +362,7 @@ int flag_weak = 1; ...@@ -362,7 +362,7 @@ int flag_weak = 1;
/* Nonzero to use __cxa_atexit, rather than atexit, to register /* Nonzero to use __cxa_atexit, rather than atexit, to register
destructors for local statics and global objects. */ destructors for local statics and global objects. */
int flag_use_cxa_atexit; int flag_use_cxa_atexit = DEFAULT_USE_CXA_ATEXIT;
/* Maximum template instantiation depth. This limit is rather /* Maximum template instantiation depth. This limit is rather
arbitrary, but it exists to limit the time it takes to notice arbitrary, but it exists to limit the time it takes to notice
......
...@@ -496,4 +496,10 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE! ...@@ -496,4 +496,10 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME "text.unlikely" #define UNLIKELY_EXECUTED_TEXT_SECTION_NAME "text.unlikely"
#endif #endif
/* Determine whether __cxa_atexit, rather than atexit, is used to
register C++ destructors for local statics and global objects. */
#ifndef DEFAULT_USE_CXA_ATEXIT
#define DEFAULT_USE_CXA_ATEXIT 0
#endif
#endif /* ! GCC_DEFAULTS_H */ #endif /* ! GCC_DEFAULTS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment