This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Fri, Aug 26, 2005 at 01:34:04PM -0700, Geoffrey Keating wrote:
"H. J. Lu" <hjl@lucon.org> writes:
The current visibility scheme doesn't work too well with symbols from
system headers. In most cases, symbols from system headers are defined
in libraries which always have default visibility. But when
-fvisibililty= or "#pragma GCC visibililty push" is used, symbols from
system headers may have non-default visibility. This leads to link-time
or run-time problems. This patch adds -fsystem-header- visibility=. It
can be used to set the symbols from system headers with different
visibility.
I think this would be better dealt with in another way, for instance
by changing the headers in question. Otherwise I see that this is the
first in a long line of patches which end up with command-line options
to control visibility for everything individually.
It is impractical to change all those header files come with all libraries.
The only other approach is to require
#pragma GCC visibililty push(default)
#pragma GCC visibililty pop
when a library header file is included. That brings to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20303
since you can't use more than 16 nested pushes with gcc 4.0.
(In particular, I don't see why 'system' headers should be treated specially.)
Does -flibrary-visibility sound better? Some C++ symbols don't come from header files. They are generated by gcc automatically.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |