This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[build] Use __cxa_atexit on Solaris 12+
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Aug 2015 13:17:58 +0200
- Subject: [build] Use __cxa_atexit on Solaris 12+
- Authentication-results: sourceware.org; auth=none
Solaris 12 introduced __cxa_atexit in libc. The following patch makes
use of it, and also removes the strange failures seen with gld reported
in PR c++/51923.
Bootstrapped without regressions on i386-pc-solaris2.1[12] and
sparc-sun-solaris2.1[12], will installl on mainline. Will backport to
the gcc 5 branch after some soak time.
Rainer
2015-02-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit on
Solaris 12+.
Use __cxa_atexit on Solaris 10+
diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -820,6 +820,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}"
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University