Boost logo

Boost :

Subject: [boost] questions regarding GCC visibility
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-03-31 21:48:09


I made a few changes to simplify code in the serialization library. This
entailed eliminating support for borland compilers, workarounds for
compilers which fail to support partial specialization of template function
and some general clean up. In the course of this effort, I had occasion to
simplify the code which supports Auto linking - and by extension visibility.
Things seemed to go pretty well. Feeling frisky, I added the switch
-fvisibility=hidden to the gcc compile of library. Now applications won't
link for lack of certain symbols. Well, they link and run fin on my machine
here at home- but fail in the test matrix.

http://www.boost.org/development/tests/develop/developer/output/Debian-Sid-boost-bin-v2-libs-serialization-test-test_array_binary_archive-test-gcc-4-9-2-debug-address-model-64-architecture-x86.html

Funny thing is:
  doesn't seem to be a problem on my machine
  doesn't seem to occur with all exported symbols - only select ones - often
but not always desctructors

I can switch Jamfile back so it doesn't specify -fvisibility=hidden, but it
seems that I'm really close to being able to generate a smaller, cleaner DLL
which I would prefer to do.

Any constructive suggestions would be appreciated.

On a related note, it seems to me that
http://www.boost.org/development/separate_compilation.html should be updated
to explain BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT which are convenient
for simplifying the auto-linking and visibility functionality.

Robert Ramey

--
View this message in context: http://boost.2283326.n4.nabble.com/questions-regarding-GCC-visibility-tp4673994.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk