From patchwork Sun Jun 13 22:18:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 55463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BF8771007D1 for ; Mon, 14 Jun 2010 08:18:11 +1000 (EST) Received: (qmail 1476 invoked by alias); 13 Jun 2010 22:18:08 -0000 Received: (qmail 1444 invoked by uid 22791); 13 Jun 2010 22:18:07 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from vexpert.dbai.tuwien.ac.at (HELO vexpert.dbai.tuwien.ac.at) (128.131.111.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Jun 2010 22:18:02 +0000 Received: from acrux.dbai.tuwien.ac.at (acrux.dbai.tuwien.ac.at [128.131.111.60]) by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTP id 013691E053; Mon, 14 Jun 2010 00:17:57 +0200 (CEST) Received: by acrux.dbai.tuwien.ac.at (Postfix, from userid 1203) id BF1C61604A; Mon, 14 Jun 2010 00:18:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by acrux.dbai.tuwien.ac.at (Postfix) with ESMTP id AC13016048; Mon, 14 Jun 2010 00:18:02 +0200 (CEST) Date: Mon, 14 Jun 2010 00:18:02 +0200 (CEST) From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org cc: Loren James Rittle Subject: [4.4] Enable default_use_cxa_atexit on FreeBSD Message-ID: User-Agent: Alpine 1.99 (LSU 1142 2008-08-13) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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"