diff options
author | Paul Brook <paul@codesourcery.com> | 2004-10-27 16:08:48 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-10-27 16:08:48 +0000 |
commit | 18fbf5995baaa360a2d6951ac7d91cc7ae002696 (patch) | |
tree | 76dbd3e55a694f789e3d6a20e1c10f46261a7f79 /gcc | |
parent | 57991ebac2ab38cf53fcda989db5825f92411534 (diff) | |
download | gcc-18fbf5995baaa360a2d6951ac7d91cc7ae002696.zip gcc-18fbf5995baaa360a2d6951ac7d91cc7ae002696.tar.gz gcc-18fbf5995baaa360a2d6951ac7d91cc7ae002696.tar.bz2 |
configure.ac: Don't test for [build] __cxa_atexit when building a cross compiler.
* configure.ac: Don't test for [build] __cxa_atexit when building a
cross compiler.
* configure: Regenerate.
From-SVN: r89684
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rwxr-xr-x | gcc/configure | 20 | ||||
-rw-r--r-- | gcc/configure.ac | 23 |
3 files changed, 37 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6683c84..68fc944 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-10-27 Paul Brook <paul@codesourcery.com> + + * configure.ac: Don't test for [build] __cxa_atexit when building a + cross compiler. + * configure: Regenerate. + 2004-10-27 Paul Brook <paul@codeosurcery.com> * configure.ac: Use build_exeext not host_exeext when lookin for diff --git a/gcc/configure b/gcc/configure index ee1802e..117fb03 100755 --- a/gcc/configure +++ b/gcc/configure @@ -12005,9 +12005,11 @@ fi # UNSORTED # -------- +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 - echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 + if test x$host = x$target; then + echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 if test "${ac_cv_func___cxa_atexit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12098,15 +12100,23 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 if test $ac_cv_func___cxa_atexit = yes; then + use_cxa_atexit=yes +else + echo "__cxa_atexit can't be enabled on this target" +fi + + else + # We can't check for __cxa_atexit when building a cross, so assume + # it is available + use_cxa_atexit=yes + fi + if test x$use_cxa_atexit = xyes; then cat >>confdefs.h <<\_ACEOF #define DEFAULT_USE_CXA_ATEXIT 1 _ACEOF -else - echo "__cxa_atexit can't be enabled on this target" -fi - + fi fi # Look for a file containing extra machine modes. diff --git a/gcc/configure.ac b/gcc/configure.ac index e5c371c..6f38875 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1295,15 +1295,24 @@ AC_SUBST(gthread_flags) # UNSORTED # -------- +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 - AC_CHECK_FUNC(__cxa_atexit, - [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.])], - echo "__cxa_atexit can't be enabled on this target") + 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"]) + else + # We can't check for __cxa_atexit when building a cross, so assume + # it is available + use_cxa_atexit=yes + fi + if test x$use_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 fi # Look for a file containing extra machine modes. |