Boost logo

Boost-Build :

Subject: Re: [Boost-build] gcc visibility support
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-08-24 04:14:50


> a) visibility is supported in version 4+ compilers. What syntax does one
> use to specify that that the above should only apply to these compilers.
>
> b) If one is building a static library, presuably the above shouldn't be
> included (though it probably does no harm). How does this modify the
> above syntax?
>
> c) The cygwin system I use to test has gcc-4.3.4 installed. BUT, the
> usage of -fvisibility=hidden evokes a compile time warning for file. The
> warning says that visibility is not supported on this build - which
> presumably is cygwin. So the above would also have to be conditioned upon
> the fact that cygwin is not being used.

The way I fixed this up for Boost.Math was to use the check-target-builds
rule to test to see if -fvisibility-hidden was supported, and then to use it
only if it is - take a look at libs/math/build/Jamfile and
libs/math/config/Jamfile to see how this works.

HTH, John.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk