Set symbol visibility to 'default', if supported by gcc.

This commit is contained in:
Brian Paul 2004-11-27 17:32:03 +00:00
parent 819b519534
commit 91d09a9ffa
2 changed files with 14 additions and 0 deletions

View File

@ -59,6 +59,13 @@ class PrintGenericStubs(gl_XML.FilterGLAPISpecBase):
print '#include "assyntax.h"'
print '#include "glapioffsets.h"'
print ''
print "/* If we build with gcc's -fvisibility=hidden flag, we'll need to change"
print "* the symbol visibility mode to 'default'."
print '*/'
print '#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303'
print '#pragma GCC visibility push(default)'
print '#endif'
print ''
print '#ifndef __WIN32__'
print ''
print '#if defined(STDCALL_API)'

View File

@ -29,6 +29,13 @@
#include "assyntax.h"
#include "glapioffsets.h"
/* If we build with gcc's -fvisibility=hidden flag, we'll need to change
* the symbol visibility mode to 'default'.
*/
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
#pragma GCC visibility push(default)
#endif
#ifndef __WIN32__
#if defined(STDCALL_API)