Mesa (7.11): Only use gcc visibility support with gcc4+.
Thomas Fogal
tfogal at kemper.freedesktop.org
Wed Nov 2 18:58:47 UTC 2011
Module: Mesa
Branch: 7.11
Commit: 449b301eecb884b38a5388518919b684e03433ed
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=449b301eecb884b38a5388518919b684e03433ed
Author: Tom Fogal <tfogal at alumni.unh.edu>
Date: Wed Oct 19 14:41:35 2011 -0600
Only use gcc visibility support with gcc4+.
I had a colleague hitting issues compiling with an old gcc3.2
system. These patches got them through.
Reviewed-by: Brian Paul <brianp at vmware.com>
(cherry-picked from commit cbb2b4149ba26ee26f73f53e9b2aa960d9e5862c)
---
include/GL/gl.h | 2 +-
src/mesa/main/compiler.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/GL/gl.h b/include/GL/gl.h
index bca550f..7fa1b15 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -67,7 +67,7 @@
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
-#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define GLAPI __attribute__((visibility("default")))
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 743841b..071f691 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -172,7 +172,7 @@ extern "C" {
* inline a static function that we later use in an alias. - ajax
*/
#ifndef PUBLIC
-# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
# else
More information about the mesa-commit
mailing list