From patchwork Fri Jan 6 17:06:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 90207 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9535814qgi; Fri, 6 Jan 2017 09:06:53 -0800 (PST) X-Received: by 10.84.210.107 with SMTP id z98mr157409580plh.171.1483722413170; Fri, 06 Jan 2017 09:06:53 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a87si80048222pfj.205.2017.01.06.09.06.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 09:06:53 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445581-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445581-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445581-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=Ibwuy4224+RRNdn7h4jDOYNQ5hc02F UcGyjkTaNbRu5LdUMXABcmCJuRzoUtmdoLs0zqcyJNmXbTJ9xLrXFWnOZw55JbCk QC65aonuwtK7mjXt0BwL4pYUiVfnQEs9bwPzLHGZAcdhaaSsUfQdN3b2/2q52DL2 CQ6S13NM1LGeg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=3rC5Y51mr5aVtdEEp/zppNxAd18=; b=Un5/ t19iV0QP4dIp3AVF/fpPb8P0gPXPGYE9PmIIpd4YRxZr9s2NcQEp8T2WEGIns+9e z+aFqf1LKhQycx35P1rFu+gPGNxvvNOhUaX5wE3Hg4O4Tz05idOtn1fi4KTCwJsl dlcaWmR1v/P4jkN07D8iY0mdaWVQrCQPDqZPov8= Received: (qmail 75268 invoked by alias); 6 Jan 2017 17:06:36 -0000 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 Received: (qmail 75236 invoked by uid 89); 6 Jan 2017 17:06:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1386, our X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jan 2017 17:06:25 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7FD290E6C; Fri, 6 Jan 2017 17:06:24 +0000 (UTC) Received: from localhost (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v06H6NAR020413; Fri, 6 Jan 2017 12:06:24 -0500 Date: Fri, 6 Jan 2017 17:06:22 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR78968 add configure check for __cxa_thread_atexit in libc Message-ID: <20170106170622.GF2966@redhat.com> References: <20170104154256.GA12632@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170104154256.GA12632@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) On 04/01/17 15:42 +0000, Jonathan Wakely wrote: >FreeBSD 11 adds __cxa_thread_atexit to libc, so we should use that >instead of defining our own inferior version. This also avoids >multiple definitions of the symbol. > > PR libstdc++/78968 > * config.h.in: Regenerate. > * configure: Likewise. > * configure.ac: Check for __cxa_thread_atexit. > * libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]: > Don't define __cxa_thread_atexit if libc provides it. > >Tested powerpc64le-linux, committed to trunk. This adds the check for freebsd cross-compilers. Tested by building x86_64-unknown-freebsd11.0 on x86_64-uknown-linux-gnu. Committed to trunk. commit 5d92bb5541b2d21a8c4e76d9f64f4c1a865e2e92 Author: Jonathan Wakely Date: Fri Jan 6 17:05:32 2017 +0000 Check for __cxa_thread_atexit for freebsd crosses PR libstdc++/78968 * crossconfig.m4: Check for __cxa_thread_atexit on *-*-freebsd*. * configure: Regenerate. diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 8cc788c..a765a18 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -132,6 +132,7 @@ case "${host}" in AC_DEFINE(HAVE_ISINFL) AC_DEFINE(HAVE_ISNANL) fi + AC_CHECK_FUNCS(__cxa_thread_atexit) ;; *-hpux*) SECTION_FLAGS='-ffunction-sections -fdata-sections'