Commit 3b572cd1 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent 089119ca
...@@ -2513,6 +2513,18 @@ if test "x$mysql_cv_bss_start" = xyes; then ...@@ -2513,6 +2513,18 @@ if test "x$mysql_cv_bss_start" = xyes; then
[Define to 1 if compiler defines __bss_start.]) [Define to 1 if compiler defines __bss_start.])
fi 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_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(cxxabi.h) AC_CHECK_HEADERS(cxxabi.h)
......
...@@ -5,4 +5,5 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \ ...@@ -5,4 +5,5 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \ 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 template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h) 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@
...@@ -9,6 +9,7 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \ ...@@ -9,6 +9,7 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
tftables.cpp twofish.cpp rabbit.cpp hc128.cpp tftables.cpp twofish.cpp rabbit.cpp hc128.cpp
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \ 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) EXTRA_DIST = $(wildcard ../include/*.hpp)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment