Commit f84b301b authored by svoj@april.(none)'s avatar svoj@april.(none)

BUG#3074: Unversioned symbols in shared library

libmysqlclient versioning when linked with GNU ld.
parent 38e5a8f6
...@@ -1057,3 +1057,4 @@ vio/test-ssl ...@@ -1057,3 +1057,4 @@ vio/test-ssl
vio/test-sslclient vio/test-sslclient
vio/test-sslserver vio/test-sslserver
vio/viotest-ssl vio/viotest-ssl
libmysql/libmysql.ver
...@@ -11,7 +11,8 @@ AM_CONFIG_HEADER(config.h) ...@@ -11,7 +11,8 @@ AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
DOT_FRM_VERSION=6 DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions. # See the libtool docs for information on how to do shared lib versions.
SHARED_LIB_VERSION=14:0:0 SHARED_LIB_MAJOR_VERSION=14
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
# ndb version # ndb version
NDB_VERSION_MAJOR=4 NDB_VERSION_MAJOR=4
...@@ -68,6 +69,7 @@ AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION], ...@@ -68,6 +69,7 @@ AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
AC_SUBST(DOT_FRM_VERSION) AC_SUBST(DOT_FRM_VERSION)
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
[Version of .frm files]) [Version of .frm files])
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
AC_SUBST(SHARED_LIB_VERSION) AC_SUBST(SHARED_LIB_VERSION)
AC_SUBST(AVAILABLE_LANGUAGES) AC_SUBST(AVAILABLE_LANGUAGES)
AC_SUBST(AVAILABLE_LANGUAGES_ERRORS) AC_SUBST(AVAILABLE_LANGUAGES_ERRORS)
...@@ -431,6 +433,13 @@ then ...@@ -431,6 +433,13 @@ then
fi fi
fi fi
# libmysqlclient versioning when linked with GNU ld.
if $LD --version 2>/dev/null|grep -q GNU; then
LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libmysql/libmysql.ver"
AC_CONFIG_FILES(libmysql/libmysql.ver)
fi
AC_SUBST(LD_VERSION_SCRIPT)
# Avoid bug in fcntl on some versions of linux # Avoid bug in fcntl on some versions of linux
AC_MSG_CHECKING("if we should use 'skip-locking' as default for $target_os") AC_MSG_CHECKING("if we should use 'skip-locking' as default for $target_os")
# Any wariation of Linux # Any wariation of Linux
......
...@@ -75,7 +75,7 @@ mysysobjects2 = my_lib.lo ...@@ -75,7 +75,7 @@ mysysobjects2 = my_lib.lo
mysysobjects = $(mysysobjects1) $(mysysobjects2) mysysobjects = $(mysysobjects1) $(mysysobjects2)
target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \ target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \
$(sql_cmn_objects) $(vio_objects) $(sqlobjects) $(sql_cmn_objects) $(vio_objects) $(sqlobjects)
target_ldflags = -version-info @SHARED_LIB_VERSION@ target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@
vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
CLEANFILES = $(target_libadd) $(SHLIBOBJS) \ CLEANFILES = $(target_libadd) $(SHLIBOBJS) \
$(target) $(target)
......
libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; };
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