diff mbox

[4.4] Enable default_use_cxa_atexit on FreeBSD

Message ID alpine.LSU.1.99.1006132320320.23468@acrux.dbai.tuwien.ac.at
State New
Headers show

Commit Message

Gerald Pfeifer June 13, 2010, 10:18 p.m. UTC
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  <gerald@pfeifer.com>

	Backport from mainline:
	2009-09-11  Loren J. Rittle  <ljrittle@acm.org>

	* 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
diff mbox

Patch

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"