Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > Mike Stump <mikest...@comcast.net> 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