From: Brian Paul Date: Sat, 27 Nov 2004 17:32:03 +0000 (+0000) Subject: Set symbol visibility to 'default', if supported by gcc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91d09a9ffad4ed838d7604ca39d301844c17812f;p=mesa.git Set symbol visibility to 'default', if supported by gcc. --- diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py index e79a5b8b70e..47cef805473 100644 --- a/src/mesa/glapi/gl_x86_asm.py +++ b/src/mesa/glapi/gl_x86_asm.py @@ -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)' diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index 44fe374295c..85ed65ed962 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -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)