$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r64800 - in trunk/libs/math: build config
From: john_at_[hidden]
Date: 2010-08-14 12:08:50
Author: johnmaddock
Date: 2010-08-14 12:08:49 EDT (Sat, 14 Aug 2010)
New Revision: 64800
URL: http://svn.boost.org/trac/boost/changeset/64800
Log:
Change build options to use -fvisibility-hidden only when the gcc compiler actually supports it.
Added:
   trunk/libs/math/config/has_gcc_visibility.cpp   (contents, props changed)
Text files modified: 
   trunk/libs/math/build/Jamfile.v2  |     3 ++-                                     
   trunk/libs/math/config/Jamfile.v2 |     3 +++                                     
   2 files changed, 5 insertions(+), 1 deletions(-)
Modified: trunk/libs/math/build/Jamfile.v2
==============================================================================
--- trunk/libs/math/build/Jamfile.v2	(original)
+++ trunk/libs/math/build/Jamfile.v2	2010-08-14 12:08:49 EDT (Sat, 14 Aug 2010)
@@ -13,9 +13,10 @@
       #<toolset>intel-linux:<pch>off
       <toolset>intel-darwin:<pch>off
       <toolset>msvc-7.1:<pch>off
-      <toolset>gcc:<cxxflags>-fvisibility=hidden
+      #<toolset>gcc:<cxxflags>-fvisibility=hidden
       <toolset>intel-linux:<cxxflags>-fvisibility=hidden
       <toolset>sun:<cxxflags>-xldscope=hidden
+      [ check-target-builds ../config//has_gcc_visibility : <cxxflags>-fvisibility=hidden : ]
     ;
 
 cpp-pch pch : ../src/tr1/pch.hpp : <include>../src/tr1 <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1 ; 
Modified: trunk/libs/math/config/Jamfile.v2
==============================================================================
--- trunk/libs/math/config/Jamfile.v2	(original)
+++ trunk/libs/math/config/Jamfile.v2	2010-08-14 12:08:49 EDT (Sat, 14 Aug 2010)
@@ -15,11 +15,14 @@
 obj has_ntl_rr : has_ntl_rr.cpp : <include>$(ntl-path)/include ;
 obj has_gmpxx : has_gmpxx.cpp :
       <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx ;
+obj has_gcc_visibility : has_gcc_visibility.cpp :
+      <toolset>gcc:<cxxflags>-fvisibility=hidden <toolset>gcc:<cxxflags>-Werror ;
 
 explicit has_long_double_support ;
 explicit has_mpfr_class ;
 explicit has_ntl_rr ;
 explicit has_gmpxx ;
+explicit has_gcc_visibility ;
 
 
 
Added: trunk/libs/math/config/has_gcc_visibility.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/math/config/has_gcc_visibility.cpp	2010-08-14 12:08:49 EDT (Sat, 14 Aug 2010)
@@ -0,0 +1,13 @@
+//  Copyright John Maddock 20010.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef __GNUC__
+# error "This is a GCC specific test case".
+#endif
+
+int main()
+{
+   return 0;
+}