From 28c2bbb03ff6144f3a09e5286c8c3ca6ad3689e8 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 29 Jul 2010 01:25:07 +0000 Subject: [PATCH] Disable symbol visibility pragmas for FreeBSD 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 | 6 +++++- rts/EndPrivate.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rts/BeginPrivate.h b/rts/BeginPrivate.h index 3ba4b89..4d7b121 100644 --- a/rts/BeginPrivate.h +++ b/rts/BeginPrivate.h @@ -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 diff --git a/rts/EndPrivate.h b/rts/EndPrivate.h index ac9df04..1d8a6b4 100644 --- a/rts/EndPrivate.h +++ b/rts/EndPrivate.h @@ -1,3 +1,3 @@ -#if __GNUC__ >= 4 +#if __GNUC__ >= 4 && !defined(freebsd_HOST_OS) #pragma GCC visibility pop #endif -- 1.7.10.4