[Commits] Rev 3190: MDEV-712 - LP:1024239 - Mysqlclient exports the same symbols as openssl in file:///H:/bzr/5.2/

Vladislav Vaintroub wlad at montyprogram.com
Fri Nov 23 14:51:09 EET 2012


At file:///H:/bzr/5.2/

------------------------------------------------------------
revno: 3190
revision-id: wlad at montyprogram.com-20121123125046-l8210a9wau1t7qfh
parent: wlad at montyprogram.com-20121122172953-8w0dpm0k5k4pkuly
fixes bug: https://launchpad.net/bugs/1024239
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 5.2
timestamp: Fri 2012-11-23 13:50:46 +0100
message:
  MDEV-712  -  LP:1024239 - Mysqlclient exports the same symbols as openssl
  
  Compile yassl and taocrypt using -fvisibility=hidden, when possible.  This prevent symbols from being exported.
-------------- next part --------------
=== modified file 'configure.in'
--- a/configure.in	2012-11-08 13:24:35 +0000
+++ b/configure.in	2012-11-23 12:50:46 +0000
@@ -2513,6 +2513,18 @@
             [Define to 1 if compiler defines __bss_start.])
 fi
 
+# check for -fvisibility=hidden compiler support (GCC >= 4)
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
+AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
+AC_COMPILE_IFELSE([char foo;],
+      [ AC_MSG_RESULT([yes])
+        SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
+        AC_MSG_RESULT([no]))
+CFLAGS="$saved_CFLAGS"
+AC_SUBST(SYMBOL_VISIBILITY)
+AC_SUBST(SYMBOL_VISIBILITY_INLINES)
+
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_CHECK_HEADERS(cxxabi.h)

=== modified file 'extra/yassl/src/Makefile.am'
--- a/extra/yassl/src/Makefile.am	2011-02-20 16:51:43 +0000
+++ b/extra/yassl/src/Makefile.am	2012-11-23 12:50:46 +0000
@@ -5,4 +5,5 @@
 	handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
 	template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
 EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
-AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@
+AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@ \
+	@SYMBOL_VISIBILITY@ @SYMBOL_VISIBILITY_INLINES@

=== modified file 'extra/yassl/taocrypt/src/Makefile.am'
--- a/extra/yassl/taocrypt/src/Makefile.am	2012-11-06 09:52:55 +0000
+++ b/extra/yassl/taocrypt/src/Makefile.am	2012-11-23 12:50:46 +0000
@@ -9,6 +9,7 @@
         tftables.cpp twofish.cpp rabbit.cpp hc128.cpp
 
 libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \
-			  @yassl_thread_cxxflags@
-
+			  @yassl_thread_cxxflags@ \
+			  @SYMBOL_VISIBILITY@ @SYMBOL_VISIBILITY_INLINES@
+ 
 EXTRA_DIST = $(wildcard ../include/*.hpp)



More information about the commits mailing list