diff options
author | Adam Jackson <[email protected]> | 2004-12-15 17:18:06 +0000 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2004-12-15 17:18:06 +0000 |
commit | 489ccef3982267b0d35c8548921f58d553c25a3a (patch) | |
tree | a2119f8246f5a9f84a0969b18a2020f6cf07f0f1 /src/mesa | |
parent | 5566127701df5c97aca94dd99b066f94943ea969 (diff) |
Fix up glx/x11 to work when built with -fvisibility=hidden.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/glheader.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 3cf9e6c8670..092d014e8e5 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -281,11 +281,16 @@ typedef GLushort GLhalfARB; /* If we build the library with gcc's -fvisibility=hidden flag, we'll * use the PUBLIC macro to mark functions that are to be exported. + * + * We also need to define a USED attribute, so the optimizer doesn't + * inline a static function that we later use in an alias. - ajax */ #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 # define PUBLIC __attribute__((visibility("default"))) +# define USED __attribute__((used)) #else # define PUBLIC +# define USED #endif |