diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2023-06-27 11:52:43 -0700 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2023-06-27 12:01:56 -0700 |
commit | b91671f3f99a75be6573287e543b6eacb4acb895 (patch) | |
tree | 3264e13782e6151d805ecd32928d5cbc1663f7ea /libsframe | |
parent | b625eff8a2346fe1107aa4ab7bbf4302f2c2136e (diff) | |
download | binutils-b91671f3f99a75be6573287e543b6eacb4acb895.zip binutils-b91671f3f99a75be6573287e543b6eacb4acb895.tar.gz binutils-b91671f3f99a75be6573287e543b6eacb4acb895.tar.bz2 |
libsframe: add library versioning
lisbframe was first released with Bintuils 2.40. As the library
evolves, some changes will break the ABI. Add library versioning for
users to manage these changes.
For the next release of the library (libsframe.so.1), incompatible ABI
changes are planned. These will include:
- Deprecation of some APIs, like sframe_get_funcdesc_with_addr (), and
- Change in the contract of some APIs (e.g., return type, behavior).
In libtool-version, set the current to 1 to prepare for the upcoming
release. Reset revision and age to 0.
Add libtool-version file to EXTRA_DIST.
libsframe/
* Makefile.am: Use libtool versioning.
* Makefile.in: Regenerated.
* libtool-version: New file.
Diffstat (limited to 'libsframe')
-rw-r--r-- | libsframe/Makefile.am | 5 | ||||
-rw-r--r-- | libsframe/Makefile.in | 9 | ||||
-rw-r--r-- | libsframe/libtool-version | 30 |
3 files changed, 43 insertions, 1 deletions
diff --git a/libsframe/Makefile.am b/libsframe/Makefile.am index 2d73662..2d1d8ff 100644 --- a/libsframe/Makefile.am +++ b/libsframe/Makefile.am @@ -29,6 +29,7 @@ INCDIR = $(srcdir)/../include # include libctf for swap.h AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf AM_CFLAGS = @ac_libsframe_warn_cflags@ +libsframe_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` if INSTALL_LIBBFD lib_LTLIBRARIES = libsframe.la @@ -40,6 +41,10 @@ endif libsframe_la_SOURCES = sframe.c sframe-dump.c sframe-error.c libsframe_la_CPPFLAGS = $(AM_CPPFLAGS) +libsframe_la_LDFLAGS = $(libsframe_version_info) + +EXTRA_DIST = libtool-version +diststuff: $(EXTRA_DIST) info include doc/local.mk diff --git a/libsframe/Makefile.in b/libsframe/Makefile.in index c6a4cd5..57f912c 100644 --- a/libsframe/Makefile.in +++ b/libsframe/Makefile.in @@ -180,6 +180,9 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +libsframe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libsframe_la_LDFLAGS) $(LDFLAGS) -o $@ @INSTALL_LIBBFD_FALSE@am_libsframe_la_rpath = @INSTALL_LIBBFD_TRUE@am_libsframe_la_rpath = -rpath $(libdir) @HAVE_COMPAT_DEJAGNU_TRUE@am__EXEEXT_1 = testsuite/libsframe.decode/be-flipping$(EXEEXT) \ @@ -519,12 +522,15 @@ INCDIR = $(srcdir)/../include # include libctf for swap.h AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf AM_CFLAGS = @ac_libsframe_warn_cflags@ +libsframe_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` @INSTALL_LIBBFD_TRUE@lib_LTLIBRARIES = libsframe.la @INSTALL_LIBBFD_FALSE@include_HEADERS = @INSTALL_LIBBFD_TRUE@include_HEADERS = $(INCDIR)/sframe.h $(INCDIR)/sframe-api.h @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libsframe.la libsframe_la_SOURCES = sframe.c sframe-dump.c sframe-error.c libsframe_la_CPPFLAGS = $(AM_CPPFLAGS) +libsframe_la_LDFLAGS = $(libsframe_version_info) +EXTRA_DIST = libtool-version @BUILD_INFO_TRUE@AM_MAKEINFOFLAGS = --no-split # Setup the testing framework @@ -654,7 +660,7 @@ clean-noinstLTLIBRARIES: } libsframe.la: $(libsframe_la_OBJECTS) $(libsframe_la_DEPENDENCIES) $(EXTRA_libsframe_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libsframe_la_rpath) $(libsframe_la_OBJECTS) $(libsframe_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libsframe_la_LINK) $(am_libsframe_la_rpath) $(libsframe_la_OBJECTS) $(libsframe_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -1568,6 +1574,7 @@ uninstall-am: uninstall-dvi-am uninstall-html-am \ .PRECIOUS: Makefile +diststuff: $(EXTRA_DIST) info @BUILD_INFO_TRUE@html-local: doc/sframe-spec/index.html @BUILD_INFO_TRUE@doc/sframe-spec/index.html: doc/sframe-spec.texi doc/$(am__dirstamp) diff --git a/libsframe/libtool-version b/libsframe/libtool-version new file mode 100644 index 0000000..9dcbe48 --- /dev/null +++ b/libsframe/libtool-version @@ -0,0 +1,30 @@ +# This file is used to maintain libtool version info for libsframe. See +# the libtool manual to understand the meaning of the fields. This is +# a separate file so that version updates don't involve re-running +# automake. +# +# Here are a set of rules to help you update your library version +# information: +# +# 1. Start with version information of `0:0:0' for each libtool library. +# +# 2. Update the version information only immediately before a public +# release of your software. More frequent updates are unnecessary, +# and only guarantee that the current interface number gets larger +# faster. +# +# 3. If the library source code has changed at all since the last +# update, then increment revision (`c:r:a' becomes `c:r+1:a'). +# +# 4. If any interfaces have been added, removed, or changed since the +# last update, increment current, and set revision to 0. +# +# 5. Increase the age value only if the changes made to the ABI are backward +# compatible. +# a. If any interfaces have been added since the last public release, +# then increment age. +# b. If any interfaces have been removed since the last public release, +# then set age to 0. +# +# CURRENT:REVISION:AGE +1:0:0 |