-fvisibility=hidden

Carson Gaspar carson at taltos.org
Thu Jul 19 23:11:55 EDT 2012


On 7/19/12 7:02 PM, Greg Banks wrote:
>
> On Fri, Jul 20, 2012, at 12:13 AM, Дилян Палаузов wrote:
>>
>> The non-portable trickery does not harm.  It is supported by GCC and
>> Clang (according to
>> http://clang-developers.42468.n3.nabble.com/Does-clang-support-attribute-visibility-quot-default-quot-td3944043.html
>> ).
>
> There are still some other compilers left in the world.  The Sun, sorry
> Oracle, compiler, for example, will parse and ignore both
> __attribute__(visibility()) in the code and -fvisibility=hidden on the
> commandline, without failing.

Adding gcc-ism's without testing for gcc in configure is a terrible 
idea. Please don't do it. The entire universe doesn't use gcc's 
non-standard compiler gunk.

The semi-portable way to do this is with a linker map (the way ELF 
versioned symbols are done), but even that is difficult to write in a 
way that works on a majority of platforms without post-processing the 
map file in configure to handle the syntax idiosyncrasies.

Isn't there enough _real_ work to do on the code and build process 
without wasting time on this sort of thing?

-- 
Carson




More information about the Cyrus-devel mailing list