From patchwork Thu May 26 11:11:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 97560 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 415E8B6EE9 for ; Thu, 26 May 2011 21:12:02 +1000 (EST) Received: (qmail 24634 invoked by alias); 26 May 2011 11:12:01 -0000 Received: (qmail 24622 invoked by uid 22791); 26 May 2011 11:12:00 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 May 2011 11:11:32 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 5D0251B0; Thu, 26 May 2011 13:11:31 +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 Cvq-7IcZiapi; Thu, 26 May 2011 13:11:30 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (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 EF9411AE; Thu, 26 May 2011 13:11:29 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p4QBBTZo017630; Thu, 26 May 2011 13:11:29 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: Only expose sparc_solaris_elf_asm_named_section declaration on Solaris (PR target/49099) Date: Thu, 26 May 2011 13:11:29 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) 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 As reported in the PR, mainline fails to build on non-Solaris SPARC targets. The following patch fixes this. Bootstrapped without regressions on sparc-sun-solaris2.11 with as and gas, tested with a i386-pc-solaris2.10 x sparc-elf cross with --enable-werror-always. Ok for mainline? Rainer 2011-05-24 Rainer Orth PR target/49099 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Wrap declaration in TARGET_SOLARIS. diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -392,8 +392,10 @@ static int save_or_restore_regs (int, in static void emit_save_or_restore_regs (int); static void sparc_asm_function_prologue (FILE *, HOST_WIDE_INT); static void sparc_asm_function_epilogue (FILE *, HOST_WIDE_INT); +#ifdef TARGET_SOLARIS static void sparc_solaris_elf_asm_named_section (const char *, unsigned int, tree) ATTRIBUTE_UNUSED; +#endif static int sparc_adjust_cost (rtx, rtx, rtx, int); static int sparc_issue_rate (void); static void sparc_sched_init (FILE *, int, int);