aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-03-02 10:01:21 +0000
committerNick Clifton <nickc@gcc.gnu.org>2006-03-02 10:01:21 +0000
commitc5dde55b61d8bbbcedbf7562f8a403d2e9f06d45 (patch)
treea9383057ec023d79c9b4ec53c552aadf810a745e /gcc
parent7533450810c6be6aa4ae7eeec6062b6fb28ab45a (diff)
downloadgcc-c5dde55b61d8bbbcedbf7562f8a403d2e9f06d45.zip
gcc-c5dde55b61d8bbbcedbf7562f8a403d2e9f06d45.tar.gz
gcc-c5dde55b61d8bbbcedbf7562f8a403d2e9f06d45.tar.bz2
config.gcc (default_use_cxa_atexit): Extend the description of this configure variable.
* config.gcc (default_use_cxa_atexit): Extend the description of this configure variable. Set its default value to "yes" for Linux, NetBSD and ELF targets on the assumption that they will use C libraries with the __cxa_atexit function. From-SVN: r111636
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config.gcc19
2 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d45c3a3..f6bad00 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-02 Nick Clifton <nickc@redhat.com>
+
+ * config.gcc (default_use_cxa_atexit): Extend the description of
+ this configure variable. Set its default value to "yes" for
+ Linux, NetBSD and ELF targets on the assumption that they will
+ use C libraries with the __cxa_atexit function.
+
2006-03-02 Ben Elliston <bje@au.ibm.com>
* config/rs6000/linux-unwind.h (frob_update_context): Mark `fs'
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 9aea7ce..c789037 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -34,9 +34,14 @@
# threads support was requested.
#
# default_use_cxa_atexit
-# "no" by default, can be set to "yes" if a target
-# wishes to use __cxa_atexit() by default if the
-# $enable___cxa_atexit variable is not set.
+# The default value for the $enable___cxa_atexit
+# variable. enable___cxa_atexit needs to be set to
+# "yes" for the correct operation of C++ destructors
+# but it relies upon the presence of a non-standard C
+# library function called __cxa_atexit.
+# Since not all C libraries provide __cxa_atexit the
+# default value of $default_use_cxa_atexit is set to
+# "no" except for targets which are known to be OK.
#
# gas_flag Either yes or no depending on whether GNU as was
# requested.
@@ -461,6 +466,8 @@ case ${target} in
tm_defines="${tm_defines} UCLIBC_DEFAULT=0"
;;
esac
+ # Assume that glibc or uClibc are being used and so __cxa_atexit is provided.
+ default_use_cxa_atexit=yes
;;
*-*-gnu*)
# On the Hurd, the setup is just about the same on
@@ -482,6 +489,8 @@ case ${target} in
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
;;
esac
+ # Assume that glibc is being used and so __cxa_atexit is provided.
+ default_use_cxa_atexit=yes
;;
*-*-netbsd*)
tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
@@ -551,6 +560,10 @@ case ${target} in
*) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
esac
;;
+*-*-elf)
+ # Assume that newlib is being used and so __cxa_atexit is provided.
+ default_use_cxa_atexit=yes
+ ;;
esac
case ${target} in