Set symbol visibility to 'default', if supported by gcc.
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 27 Nov 2004 17:32:03 +0000 (17:32 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 27 Nov 2004 17:32:03 +0000 (17:32 +0000)
src/mesa/glapi/gl_x86_asm.py
src/mesa/x86/glapi_x86.S

index e79a5b8b70e83f31f6f8d484a6704abc61e976e0..47cef8054736d7ff61baa3e84831688983ae4da9 100644 (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)'
index 44fe374295ca729dcbe70430c121a704f2d4e99c..85ed65ed962d90f50a8f7ad5573f268f46bef606 100644 (file)
 #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)