diff options
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 |