Split out from <http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00208.html>

Functionality was added in OpenBSD 4.3 and has been used by the system
compiler ever since.

Tested on i386-*-openbsd5.2 and amd64-*-openbsd5.2.  Changes a couple
of FAILs on constructor/destructor related tests into PASSes.


2012-09-02  Mark Kettenis  <kette...@openbsd.org>

        * config.gcc (*-*-openbsd4.[3-9]|*-*-openbsd[5-9]*): Set
        default_use_cxa_atexit to yes.

Index: config.gcc
===================================================================
--- config.gcc  (revision 191120)
+++ config.gcc  (working copy)
@@ -708,6 +708,11 @@
     *-*-openbsd2.*|*-*-openbsd3.[012])
       tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
   esac
+  case ${target} in
+    *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
+      default_use_cxa_atexit=yes
+      ;;
+  esac
   ;;
 *-*-rtems*)
   case ${enable_threads} in

Reply via email to