aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@wasabisystems.com>2003-06-03 20:39:52 +0000
committerJason Thorpe <thorpej@gcc.gnu.org>2003-06-03 20:39:52 +0000
commit2121a768f733092cc437444af0e78ec2e64c81f8 (patch)
treed4778ac9522878385fc7006737b38f9f7ca29f8b /gcc/config.gcc
parentccb36e104bcb750e819ecb299dcc0a9d3bfd5e62 (diff)
downloadgcc-2121a768f733092cc437444af0e78ec2e64c81f8.zip
gcc-2121a768f733092cc437444af0e78ec2e64c81f8.tar.gz
gcc-2121a768f733092cc437444af0e78ec2e64c81f8.tar.bz2
config.gcc (default_use_cxa_atexit): New variable, defaults to no.
* config.gcc (default_use_cxa_atexit): New variable, defaults to no. (*-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*): Set default_use_cxa_atexit to yes. * configure.in: Allow default_use_cxa_atexit to determine the value of DEFAULT_USE_CXA_ATEXIT if not explicitly enabled or disabled. * configure: Regenerate. From-SVN: r67401
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index c49dd7b..5e74638 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -35,6 +35,11 @@
# enable_threads_flag Either the name, yes or no depending on whether
# 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.
+#
# gas_flag Either yes or no depending on whether GNU as was
# requested.
#
@@ -221,6 +226,7 @@ thread_file=
gas="$gas_flag"
gnu_ld="$gnu_ld_flag"
enable_threads=$enable_threads_flag
+default_use_cxa_atexit=no
target_gtfiles=
need_64bit_hwint=
@@ -435,6 +441,14 @@ case $machine in
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
;;
esac
+
+ # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
+ # default (unless overridden by --disable-__cxa_atexit).
+ case $machine in
+ *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
+ default_use_cxa_atexit=yes
+ ;;
+ esac
;;
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
# This is the place-holder for the generic a.out configuration