Disable symbol visibility pragmas for FreeBSD
authorIan Lynagh <igloo@earth.li>
Thu, 29 Jul 2010 01:25:07 +0000 (01:25 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 29 Jul 2010 01:25:07 +0000 (01:25 +0000)
Do not use GCC pragmas for controlling visibility, because it causes
"undefined reference" errors at link-time.  The true reasons are
unknown, however FreeBSD 8.x includes GCC 4.2.1 in the base system,
which might be buggy.

rts/BeginPrivate.h
rts/EndPrivate.h

index 3ba4b89..4d7b121 100644 (file)
@@ -1,3 +1,7 @@
-#if __GNUC__ >= 4
+/* We don't use symbol visibility pragmas on FreeBSD, because it causes
+   "undefined reference" errors at link-time.  The true reasons are
+   unknown, however FreeBSD 8.x includes GCC 4.2.1 in the base system,
+   which might be buggy. */
+#if __GNUC__ >= 4 && !defined(freebsd_HOST_OS)
 #pragma GCC visibility push(hidden)
 #endif
index ac9df04..1d8a6b4 100644 (file)
@@ -1,3 +1,3 @@
-#if __GNUC__ >= 4
+#if __GNUC__ >= 4 && !defined(freebsd_HOST_OS)
 #pragma GCC visibility pop
 #endif