aboutsummaryrefslogtreecommitdiff
path: root/libsframe/configure.ac
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2023-06-27 11:54:12 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2023-06-27 12:01:56 -0700
commit99fde044fc332b97616b395393b2590c510b0e6f (patch)
tree57b6718330455df0d1f4b8fe6756590c63cf2e47 /libsframe/configure.ac
parent852bb8c10de8abef79f0771dca879ddc8e4298b3 (diff)
downloadgdb-99fde044fc332b97616b395393b2590c510b0e6f.zip
gdb-99fde044fc332b97616b395393b2590c510b0e6f.tar.gz
gdb-99fde044fc332b97616b395393b2590c510b0e6f.tar.bz2
libsframe: add symbol versioning
Define an empty base version LIBSFRAME_0.0 and add all symbols to version LIBSFRAME_1.0. The previous release of libsframe (libsframe.so.0) did not have versioned symbols. Adding a libsframe.ver file so that future releases of the library (and its consumers) can manage the changes better. For Solaris ld, use -M mapfile command line option. libsframe does not restrict the set of exported symbols, so at this time there is no need to fall back on the libtool's -export-symbols option for platforms where some other linker (with a different command line option for symbol versioning) may be used. libsframe/ * Makefile.am: Use symbol versioning for libsframe. * Makefile.in: Regenerated. * configure: Check for Solaris ld. * configure.ac: Regenerated. * libsframe.ver: New file.
Diffstat (limited to 'libsframe/configure.ac')
-rw-r--r--libsframe/configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/libsframe/configure.ac b/libsframe/configure.ac
index b9ea363..8189e96 100644
--- a/libsframe/configure.ac
+++ b/libsframe/configure.ac
@@ -81,6 +81,34 @@ else
fi
AM_CONDITIONAL(BUILD_INFO, test "${build_info}" = yes)
+dnl Determine if using Solaris linker
+AC_MSG_CHECKING([if using Solaris linker])
+SLD=`$LD --version 2>&1 | grep Solaris`
+if test "$SLD"; then
+ have_solaris_ld=yes
+ AC_MSG_RESULT(yes)
+else
+ have_solaris_ld=no
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes")
+
+if test "$have_solaris_ld" = "yes"; then
+ GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'`
+else
+ GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+fi
+
+if test "$GLD"; then
+ have_ld_version_script=yes
+ AC_MSG_RESULT(yes)
+else
+ have_ld_version_script=no
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(*** Versioned symbols not enabled.)
+fi
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+
AM_MAINTAINER_MODE
AM_INSTALL_LIBBFD