hidden visibility on mac (Re: [PUSHED][3-5] Re: [REVIEW 3-5] fdo#37044 crash on mac with transliteration)

Michael Stahl mstahl at redhat.com
Thu May 10 03:54:55 PDT 2012


On 10/05/12 12:43, Tor Lillqvist wrote:
>> that sw can call it?  don't we use default hidden visibility on Mac
>> platform?
> 
> Don't think so. At least in that Mac build tree I have that uses Xcode
> 3 and its gcc 4.0.1 and the 10.4 SDK, config_host.mk ends up with
> HAVE_GCC_VISIBILITY_FEATURE blank. On the other hand,
> solenv/gbuild/platform/macosx.mk unconditionally sets gb_COMPILERDEFS
> += -DHAVE_GCC_VISIBILITY_FEATURE ? Weird.

indeed that looks silly.

> Either visibility is something that really works "as expected" only
> with gcc and ELF (because, I guess, that is what those who expect it
> to work use;), or then the configure.in fails to recognize it working
> well enough.

i'm not all that familiar with how MachO linker works (other than its
fancy install_names :).

> Is visibility, as we want it, something that also the object and/or
> dynamic library format(s) need to support, or can it be implemented
> just in a compiler?

hidden visibility is definitely desirable, because it prevents
accidental collisions like this bug and probably also improves
performance (though not sure if measurably so).

however it could be the case that with MachO something inherently
doesn't work or is buggy in the toolchain, but i guess we could only
find that out by trying (and fixing the couple of cases where it doesn't
work in non-inherent accidental ways).

> Note that Xcode 3 and the 10.4 SDK are obsolete but we keep requiring
> them as the official build environment because we want to keep
> producing binaries that work on 10.4. It is possible now, though, to
> build LO master also using a current (4.3.x) Xcode, and its Clang
> even, against the 10.6 SDK, but it has not been tested really that
> much.

would be nice if we could get rid of that ancient compiler; is it
possible to use something newer while targeting 10.4?  if not, i'd
strongly consider raising the Mac baseline for LO4, Apple doesn't
support 10.4 with updates any more anyway AFAIK.

> I now remember that I had to add a few lines to disable
> HAVE_GCC_VISIBILITY_FEATURE in configure.in when using Clang for
> MacOSX, because of some weird linking errors in connectivity and
> dbaccess. But maybe if the root cause to chose could be resolved,
> visiility could be used in that build configuration, at least?
> 
> --tml



More information about the LibreOffice mailing list