]> git.saurik.com Git - wxWidgets.git/commitdiff
the Ubuntu visibility bug only happens when building shared libraries on some systems...
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 7 Aug 2007 21:13:11 +0000 (21:13 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 7 Aug 2007 21:13:11 +0000 (21:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/aclocal/visibility.m4
configure

index 35a9ea02414f52ea41741b894cb3227ab40d09b6..0f02567b9c8c4b61bc3143a969364312af937840 100644 (file)
@@ -66,19 +66,23 @@ AC_DEFUN([WX_VISIBILITY],
       AC_MSG_CHECKING([for broken libstdc++ visibility])
       AC_CACHE_VAL(wx_cv_cc_broken_libstdcxx_visibility, [
         wx_save_CXXFLAGS="$CXXFLAGS"
+        wx_save_LDFLAGS="$LDFLAGS"
         CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY"
+        LDFLAGS="$LDFLAGS -shared -fPIC"
         AC_LANG_PUSH(C++)
         AC_TRY_LINK(
           [
             #include <string>
           ],
           [
-            std::string x;
+            std::string s("hello");
+            return s.length();
           ],
           wx_cv_cc_broken_libstdcxx_visibility=no,
           wx_cv_cc_broken_libstdcxx_visibility=yes)
         AC_LANG_POP()
-        CXXFLAGS="$wx_save_CXXFLAGS"])
+        CXXFLAGS="$wx_save_CXXFLAGS"
+        LDFLAGS="$wx_save_LDFLAGS"])
       AC_MSG_RESULT([$wx_cv_cc_broken_libstdcxx_visibility])
       if test $wx_cv_cc_broken_libstdcxx_visibility = yes; then
         AC_DEFINE([HAVE_BROKEN_LIBSTDCXX_VISIBILITY])
index f5d86be5521b9cc63ab1df14d006157f6f90040a..e0df6cb0fcf3a4d8e9e1be20e0381aa4b19f05b3 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Id: configure.in 47918 2007-08-07 01:23:34Z VZ .
+# From configure.in Id: configure.in 47919 2007-08-07 01:38:18Z VZ .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
 #
@@ -36209,7 +36209,9 @@ echo $ECHO_N "checking for broken libstdc++ visibility... $ECHO_C" >&6; }
 else
 
         wx_save_CXXFLAGS="$CXXFLAGS"
+        wx_save_LDFLAGS="$LDFLAGS"
         CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY"
+        LDFLAGS="$LDFLAGS -shared -fPIC"
         ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -36229,7 +36231,8 @@ int
 main ()
 {
 
-            std::string x;
+            std::string s("hello");
+            return s.length();
 
   ;
   return 0;
@@ -36270,6 +36273,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
         CXXFLAGS="$wx_save_CXXFLAGS"
+        LDFLAGS="$wx_save_LDFLAGS"
 fi
 
       { echo "$as_me:$LINENO: result: $wx_cv_cc_broken_libstdcxx_visibility" >&5