From patchwork Sun Jun 13 22:18:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4.4] Enable default_use_cxa_atexit on FreeBSD Date: Sun, 13 Jun 2010 12:18:02 -0000 From: Gerald Pfeifer X-Patchwork-Id: 55463 Message-Id: To: gcc-patches@gcc.gnu.org Cc: Loren James Rittle This is a backport of a change Loren made last year to align vanilla GCC with the FreeBSD system compiler. I am applying it based on Loren's approval off-list. 2010-06-13 Gerald Pfeifer Backport from mainline: 2009-09-11 Loren J. Rittle * config.gcc (*-*-freebsd*): Enable default_use_cxa_atexit to match the system compiler's configuration at inflection point. Testing shows no regressions introduced by this patch, cf. http://gcc.gnu.org/ml/gcc-testresults/2010-06/msg01340.html (pre) http://gcc.gnu.org/ml/gcc-testresults/2010-06/msg01366.html (post) Initially I was a bit confused to see two new additional unexpected failures in the g++ testsuite, but these are just conversions from "unsupported" to "failure" and the result is completely aligned with what we see for GCC 4.5 and mainline. g++.old-deja/g++.other/init18.C and g++.old-deja/g++.other/init19.C are keyed off cxa_atexit. At the same time we gain four additional passes and even 12 for libstdc++. === g++ tests === # of expected passes 20171 20175 # of unexpected failures 2 4 # of expected failures 159 157 # of unsupported tests 127 125 === libstdc++ Summary === # of expected passes 5806 5818 # of unexpected failures 5 5 # of expected failures 79 79 # of unsupported tests 363 357 Gerald Index: config.gcc =================================================================== --- config.gcc (revision 160687) +++ config.gcc (working copy) @@ -481,6 +481,12 @@ ;; esac fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h" + case ${target} in + *-*-freebsd[345].*) + :;; + *) + default_use_cxa_atexit=yes;; + esac ;; *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu) extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"