Subject: Re: [boost] support for gcc hidden visibility in shared libraries
From: Alexander Arhipenko (arhipjan_at_[hidden])
Date: 2008-12-05 10:57:10
On Fri, Dec 5, 2008 at 3:56 PM, Stjepan Rajko <stjepan.rajko_at_[hidden]> wrote:
> The ticket has no owner - perhaps that is the problem? To quote David
> Abrahams from the thread above:
> On Fri, Jul 11, 2008 at 5:11 PM, David Abrahams <dave <at> boostpro.com> wrote:
>> patches tend to be more impactful when attached to Trac
>> tickets: http://svn.boost.org ;-)
> Perhaps Dave would like to take over the patch and make his statement
> tend to be more true? ;-)
I've assigned ticket to David Abrahams.
2 Dave: hope this won't make you angry J
> Three comments:
> * the darwin toolset is affected the same way as gcc
Is __GNUC__ macro defined when using darwin?
> * will the added -fvisibility=hidden cause a problem with gcc<4?
Actually I didn't tested gcc of versions lower than 4.
My expectation is that gcc will only eliminate warnings about unknown
BTW, the better approach for passing '-fvisibility=hidden' will be creation
of some kind of alias (or rule?) for this (in order not to duplicate
code in jamfiles).
I mean something like this:
alias hide_symbols : : : : <toolset>gcc:<cxxflags>"-fvisibility=hidden" ;
lib a : [ glob *.cpp ] : <link>shared:<dependency>hide_symbols ;
We're actively using boost.build, but I couldn't say that I'm
Maybe boost.build guys could help on this.
> * I would prefer the slightly more descriptive macro names discussed
> in the thread (I think BOOST_SYMBOL_EXPORT is my favorite)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk