diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-01 06:23:12 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-01 06:23:12 +0000 |
commit | d91ef9b080d6973de3f2a6851855a03b54743d52 (patch) | |
tree | a6f02d60df84edc128eac9c800531bb6b5dc6bbb /gcc/configure.ac | |
parent | a39e926c3645803ac16fcfdd6184ab7e05bb29a7 (diff) | |
download | gcc-d91ef9b080d6973de3f2a6851855a03b54743d52.tar.gz |
* target.h (targetm.cxx.use_atexit_for_cxa_atexit): New target
hook.
* target-def.h: (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT): Define
default.
* config/i386/mingw32.h (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT):
Override default.
* doc/tm.texi (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT): Document.
* configure.ac (use_cxa_atexit): As a special case, don't test
for libc definition of __cxa_atexit on mingw32
* configure: Regenerate.
* config.gcc (i[34567]86-pc-mingw32): Default to
enable__cxa_atexit=yes.
cp
* decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
if targetm.cxx.use_atexit_for cxa_atexit.
(start_cleanup_fn): Likewise.
(register_dtor_fn): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118371 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 0b42531ff6d..7b571385ce4 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1429,8 +1429,17 @@ use_cxa_atexit=no if test x$enable___cxa_atexit = xyes || \ test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then if test x$host = x$target; then - AC_CHECK_FUNC(__cxa_atexit,[use_cxa_atexit=yes], - [echo "__cxa_atexit can't be enabled on this target"]) + case $host in + # mingw32 doesn't have __cxa_atexit but uses atexit registration + # keyed to flag_use_cxa_atexit + *-*-mingw32*) + use_cxa_atexit=yes + ;; + *) + AC_CHECK_FUNC(__cxa_atexit,[use_cxa_atexit=yes], + [echo "__cxa_atexit can't be enabled on this target"]) + :: + esac else # We can't check for __cxa_atexit when building a cross, so assume # it is available |