Use __cxa_atexit on Solaris 12+
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 27 Aug 2015 12:00:32 +0000 (12:00 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 27 Aug 2015 12:00:32 +0000 (12:00 +0000)
* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit on
Solaris 12+.

From-SVN: r227255

gcc/ChangeLog
gcc/config.gcc

index ad56ed16b12de5abaf8c32396874b91e56b5a458..6809668597f591611fc426131073ae810e95ec37 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit on
+       Solaris 12+.
+
 2015-08-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
            Andre Vieira  <andre.simoesdiasvieira@arm.com>
 
index 24f6d35d5cbcb3b33dd85f20f8d09c7eccafb97a..f8582eb550d812458f6b3ad3ab19d64fbf88b6de 100644 (file)
@@ -835,6 +835,12 @@ case ${target} in
   sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
   sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
   sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
+  case ${target} in
+    *-*-solaris2.1[2-9]*)
+      # __cxa_atexit was introduced in Solaris 12.
+      default_use_cxa_atexit=yes
+      ;;
+  esac
   use_gcc_stdint=wrap
   if test x$gnu_ld = xyes; then
     tm_file="usegld.h ${tm_file}"