Our docs about --enable/--disable-visibility
Vincenzo Innocente
Vincenzo.Innocente@cern.ch
Mon Oct 31 10:41:00 GMT 2011
On 31 Oct, 2011, at 11:31 AM, Paolo Carlini wrote:
> Hi,
>> On 29 Oct, 2011, at 2:26 PM, Jonathan Wakely wrote:
>>
>>> Yes, that's my interpretation: users can use -fvisibility=hidden
>>> without getting segfaults because they've hidden parts of libstdc++
>>> that must not be hidden.
>>>
>> Can somebody provide me an example of a code that segfaults if "namespace std" is not default visible? I never had problems, neither with std nor with other libraries such as boost.
> Well, I guess it depends a lot on which parts of the library are you using and how you are linking together "stuff". For sure you have a point in that for many years v3 didn't have the mechanism available and definitely was already largely usable, neither the decorations existed in the HP/SGI STL headers which people used to just drop-in in their systems circa ~1990s (thus completing large interesting C++ only projects). All in all, anyway, I think it's uncontroversial that the current *default* is Ok for the large majority of the users.
>
The problem is that "default" means "force external visibility", not "use user visibility".
"the large majority of the users" will not set visibility at all, therefore "no decoration" will be equivalent to "external visibility".
The current default instead forces those willing to control visibility to recompile the compiler in order to control the visibility of symbols that, because templated, will eventually end in their on libraries and be exported from there to the final userland.
(I'm not arguing here about the symbols in libstdc++.so at the moment).
vincenzo
> Paolo.
More information about the Libstdc++
mailing list