From patchwork Wed Aug 26 11:17:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 510809 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D67BF1401DA for ; Wed, 26 Aug 2015 21:18:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=k3gYOxDr; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=oVDwJOLKDTDLmvzFwDeEE4YOE9YbmXOg/Uv7egthoEwy8D1NOX8Oj ByYtTpYG+zf8HqvgKclDuo7wCty5JnJiLo14C5TKPzq2O+92cCLAEu1lnp62p0Uw KfvKhly1nUJtvfIY4QTpS3YuNxJRqJUSN2cx7ZUJ52z89hsbHm+kd4= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=yLDnNFM8hspbsG9OnaUzuqwy/wg=; b=k3gYOxDrHQfZvm7zlQxK a5gWyOiNBIpFw2vYFou954g2YZi5BPdfh0RKA3OKzcAPI91a8fX7kiYJprEuwelp ya9ltqUx3CqH/Q58IUSUsu9d/EZtRnq/b1zBhOgR9DIsCzGCsIfxby7jHrhLzLUI JxmBf8eWdW4cfZ4y9i+EKYU= Received: (qmail 99898 invoked by alias); 26 Aug 2015 11:18:04 -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 99739 invoked by uid 89); 26 Aug 2015 11:18:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Aug 2015 11:18:02 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id BD539508 for ; Wed, 26 Aug 2015 13:18:00 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PID5aRKk9nus for ; Wed, 26 Aug 2015 13:17:59 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 37C02505 for ; Wed, 26 Aug 2015 13:17:59 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.1+Sun/8.15.1/Submit) id t7QBHwCS017861; Wed, 26 Aug 2015 13:17:58 +0200 (CEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [build] Use __cxa_atexit on Solaris 12+ Date: Wed, 26 Aug 2015 13:17:58 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Solaris 12 introduced __cxa_atexit in libc. The following patch makes use of it, and also removes the strange failures seen with gld reported in PR c++/51923. Bootstrapped without regressions on i386-pc-solaris2.1[12] and sparc-sun-solaris2.1[12], will installl on mainline. Will backport to the gcc 5 branch after some soak time. Rainer 2015-02-10 Rainer Orth * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit on Solaris 12+. Use __cxa_atexit on Solaris 10+ diff --git a/gcc/config.gcc b/gcc/config.gcc --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -820,6 +820,12 @@ case ${target} in sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h" sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h" sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}" + case ${target} in + *-*-solaris2.1[2-9]*) + # __cxa_atexit was introduced in Solaris 12. + default_use_cxa_atexit=yes + ;; + esac use_gcc_stdint=wrap if test x$gnu_ld = xyes; then tm_file="usegld.h ${tm_file}"