From 489ccef3982267b0d35c8548921f58d553c25a3a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 15 Dec 2004 17:18:06 +0000 Subject: Fix up glx/x11 to work when built with -fvisibility=hidden. --- src/mesa/main/glheader.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 3cf9e6c867..092d014e8e 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 -- cgit v1.2.3