From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10186 invoked by alias); 19 Apr 2011 18:12:27 -0000 Received: (qmail 10178 invoked by uid 22791); 19 Apr 2011 18:12:27 -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; Tue, 19 Apr 2011 18:12:13 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id F38333BD; Tue, 19 Apr 2011 20:12:11 +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 BhAaBMQe1+nK; Tue, 19 Apr 2011 20:12:10 +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 E63CF3BC; Tue, 19 Apr 2011 20:12:09 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p3JIC9FJ003924; Tue, 19 Apr 2011 20:12:09 +0200 (MEST) From: Rainer Orth To: Mike Stump Cc: gcc-patches@gcc.gnu.org, Richard Guenther Subject: Re: [lto, testsuite] Don't use visibility on targets that don't support it (PR lto/47334) References: Date: Tue, 19 Apr 2011 18:31:00 -0000 In-Reply-To: (Rainer Orth's message of "Tue, 05 Apr 2011 20:21:27 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01565.txt.bz2 Rainer Orth writes: > Mike Stump writes: > >> On Apr 5, 2011, at 1:56 AM, Rainer Orth wrote: >>> * lto.c (promote_var): Only set VISIBILITY_HIDDEN if >>> HAVE_GAS_HIDDEN. >> >> Oh, at a minimum, if TARGET_ASM_ASSEMBLE_VISIBILITY is set, doing this stuff I think is useful? > > No, this won't work. E.g. on Solaris with an assembler without > visibility support, TARGET_ASM_ASSEMBLE_VISIBILITY is set, but just > emits a warning. This is similiar to default_assemble_visibility with > HAVE_GAS_HIDDEN undefined. > > Right now, there are four definitions of TARGET_ASM_ASSEMBLE_VISIBILITY: > > * i386/cygming.h: i386_pe_assemble_visibility only warns about > visibility attributes, so no problem here. > > * darwin.h: darwin_assemble_visibility is the only implementation which > can handle VISIBILITY_HIDDEN (only), but doesn't define > HAVE_GAS_HIDDEN. Maybe it should, but one would have to check every > instance of the macro to make sure there are no ill effects. > > * rs6000/rs6000.c: protected by HAVE_GAS_HIDDEN. > > * sol2.h: warns unless HAVE_GAS_HIDDEN. I've had a closer look now and think it's possible (and desirable) to define HAVE_GAS_HIDDEN for Darwin, too. I've now (after lots of trouble, and without success getting Ada to bootstrap on PowerPC Darwin) set up a development environment on Mac OS X 10.5, both i386 and powerpc. My current plan (though this may be slow) is to define HAVE_GAS_HIDDEN for Darwin in gcc/configure.ac and check what else is necessary to make this work. Once that is done, my patch can probably go in. Additionally, one might want to rename HAVE_GAS_HIDDEN to HAVE_AS_VISIBILITY since that's what the macro really means. (Actually, that's a lie: it means HAVE_AS_LD_VISIBILITY, but I don't think we need to become that verbose.) Does this sound reasonable? Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University