pixman: Branch 'master'
Alan Coopersmith
alanc at kemper.freedesktop.org
Thu Aug 21 14:21:18 PDT 2008
configure.ac | 15 +++++++++++++++
pixman/pixman-private.h | 3 +++
2 files changed, 18 insertions(+)
New commits:
commit 9b9f7b59e5ce17735157ca9b154e8bc545f5c96b
Author: Ginn Chen <ginn.chen at sun.com>
Date: Thu Aug 21 14:21:01 2008 -0700
Use hidden attribute for private functions when compiling with Sun Studio
https://bugs.freedesktop.org/show_bug.cgi?id=17183
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
diff --git a/configure.ac b/configure.ac
index 702bed0..0cf32c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,21 @@ if test "x$have_gcc4" = "xyes"; then
fi
AC_MSG_RESULT($have_gcc4)
+have_sunstudio8=no
+AC_MSG_CHECKING([for -xldscope (Sun compilers)])
+AC_COMPILE_IFELSE([
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#else
+#error Need Sun Studio 8 for visibility
+#endif
+int main () { return 0; }
+], have_sunstudio8=yes)
+
+if test "x$have_sunstudio8" = "xyes"; then
+ CFLAGS="$CFLAGS -xldscope=hidden"
+fi
+AC_MSG_RESULT($have_sunstudio8)
+
dnl ===========================================================================
dnl Check for MMX
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index a27d2a8..e26a0c3 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -729,6 +729,9 @@ pixman_compute_composite_region32 (pixman_region32_t * pRegion,
/* GCC visibility */
#if defined(__GNUC__) && __GNUC__ >= 4
#define PIXMAN_EXPORT __attribute__ ((visibility("default")))
+/* Sun Studio 8 visibility */
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define PIXMAN_EXPORT __global
#else
#define PIXMAN_EXPORT
#endif
More information about the xorg-commit
mailing list