Merge branch 'mesa_7_6_branch'
[mesa.git] / src / mesa / x86 / assyntax.h
index 16aaf900f76c207a6022a8e1b7a948e6aee450b3..524944f73a4ef69bfc8cc39fa526fad6eafa4f7c 100644 (file)
@@ -985,7 +985,8 @@ SECTION _DATA public align=16 class=DATA use32 flat
 
 #if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \
  || (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \
- || defined(__FreeBSD__) && __FreeBSD__ >= 3
+ || (defined(__FreeBSD__) && __FreeBSD__ >= 3) \
+ || (defined(__NetBSD__) && defined(__ELF__))
 #define GLNAME(a)      a
 #else
 #define GLNAME(a)      CONCAT(_, a)
@@ -1730,4 +1731,17 @@ SECTION _DATA public align=16 class=DATA use32 flat
 #define TLBL(a)                CONCAT(a,$)
 #endif
 
+/* Hidden symbol visibility support.
+ * If we build with gcc's -fvisibility=hidden flag, we'll need to change
+ * the symbol visibility mode to 'default'.
+ */
+#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)
+#  define HIDDEN(x) .hidden x
+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 && !defined(__DJGPP__) && !defined(__MINGW32__)
+#  pragma GCC visibility push(default)
+#  define HIDDEN(x) .hidden x
+#else
+#  define HIDDEN(x)
+#endif
+
 #endif /* __ASSYNTAX_H__ */