From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by sourceware.org (Postfix) with ESMTPS id 3B8FE385355A for ; Tue, 6 Sep 2022 15:41:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B8FE385355A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by mail.gandi.net (Postfix) with ESMTPSA id D04741BF214; Tue, 6 Sep 2022 15:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seketeli.org; s=gm1; t=1662478884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mEm+SRKVQZQoh5rMsWfe0U6h/DvUKqC2rNbBHADF05k=; b=WGTrqe3SltaE1McQhcfDTtw79RbryB53gRe+zbzllN2RJ7GyjHU6jObhowmt69OUSCTWjB EoB+xAnakn888SgOyzycxlrY9W8uaw1DUu7RvErRA/zf+7wBuKf/bicPvzTZSwEYGGdbg/ x6h8KPgvQz4UBxWSs/JC3I2un3d4BKgX4tdbHd783Ez/6WS5OBNq1qibIHiE0Yci1QPuDE AYEcilun8GCu3h2ifQm67RUoqz8mZlK68RY6fiDHlhhmJ1+fLbB9XqhhysMkhHCc6jCXgj SJAb5enhsH1rv7jq3T6gonAosqlwYyQsL6gk+bEKVnK3x8dbV3qOof26CWCb8A== Received: by localhost (Postfix, from userid 1000) id 454D85802BD; Tue, 6 Sep 2022 17:41:23 +0200 (CEST) From: Dodji Seketeli To: Ben Woodard via Libabigail Cc: Ben Woodard Subject: Re: [PATCH] Bug 28669 Increment Library version Organization: Me, myself and I References: <20220628222600.1362127-1-woodard@redhat.com> X-Operating-System: Fedora 38 X-URL: http://www.seketeli.net/~dodji Date: Tue, 06 Sep 2022 17:41:23 +0200 In-Reply-To: <20220628222600.1362127-1-woodard@redhat.com> (Ben Woodard via Libabigail's message of "Tue, 28 Jun 2022 15:26:00 -0700") Message-ID: <87a67cik7w.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, Ben Woodard via Libabigail a =C3=A9crit: > Add library version to libabigail 2.1 to not cause problems with older > utilities due to library version incompatibility. This will also stop > tools that look for libraries which have a different ABI but the same > version from complaining. > > * src/Makefile.am: Add library version. This is nice and long overdue, so Thank You for getting your hands dirty on this task. I have slightly augmented the change to define the CURRENT,REVISION and AGE libtool variables in the configure.ac file so that we can update them there at release time, just like what we do for the major and minor version numbers of the project as well as the ABIXML version numbers. The -version option passed to the linker then re-uses the libtool variables defined in configure.ac. Below is the resulting patch that I am applying to master to that effect. Cheers, =20 >From 2bfea52331211cf16fba00d4d2a40f9bbc679cf8 Mon Sep 17 00:00:00 2001 From: Ben Woodard via Libabigail Date: Tue, 28 Jun 2022 15:26:00 -0700 Subject: [PATCH] Bug 28669 - Increment Library version Add libtool versioning to libabigail.so starting from 2.1 onward to not cause problems with older utilities due to library version incompatibility. This will also stop tools that look for libraries which have a different ABI but the same version from complaining. * configure.ac: Define the variables libabigail_so_{current, revision, age}. These are to be adjusted after each releases depending on how the compatibility status of the libabigail's code. * src/Makefile.am: Add -version-info $(LIBABIGAIL_SO_CURRENT):$(LIBABIGAIL_SO_REVISION):$(LIBABIGAIL_SO_AGE) to LDFLAGS. Signed-off-by: Ben Woodard Signed-off-by: Dodji Seketeli --- configure.ac | 33 +++++++++++++++++++++++++++++++++ src/Makefile.am | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 97b3469f..ee8885e9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,34 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +dnl Libabigail version number is handled here with the major and minor +dnl version numbers. m4_define([version_major], [2]) m4_define([version_minor], [1]) =20 +dnl Below are the numbers to handle libabigail.so's versionning +dnl following the libtool's versionning scheme to handle shared +dnl libraries' compatibility. +dnl +dnl Below are the rules to follow to update the three numbers +dnl (LIBABIGAIL_SO_CURRENT, LIBABIGAIL_SO_REVISION and LIBABIGAIL_SO_AGE): +dnl +dnl 1. If the library source code has changed at all since the last +dnl update, then increment LIBABIGAIL_SO_REVISION ('C:R:A' becomes +dnl 'C:R+1:A'). +dnl=20 +dnl 2. If any interfaces have been added, removed, or changed since +dnl the last update, increment LIBABIGAIL_SO_CURRENT, and set +dnl LIBABIGAIL_REVISION to 0. +dnl=20 +dnl 3. If any interfaces have been added since the last public release, +dnl then increment LIBABIGAIL_SO_AGE. +dnl=20 +dnl 4. If any interfaces have been removed or changed since the last +dnl public release, then set LIBABIGAIL_SO_AGE to 0. +m4_define([libabigail_so_current], [1]) +m4_define([libabigail_so_revision], [0]) +m4_define([libabigail_so_age], [0]) + AC_INIT([libabigail], [version_major.version_minor], [http://sourceware.org/bugzilla], @@ -40,12 +67,18 @@ VERSION_MINOR=3Dversion_minor VERSION_REVISION=3D0 ABIXML_VERSION_MAJOR=3D2 ABIXML_VERSION_MINOR=3D1 +LIBABIGAIL_SO_CURRENT=3Dlibabigail_so_current +LIBABIGAIL_SO_REVISION=3Dlibabigail_so_revision +LIBABIGAIL_SO_AGE=3Dlibabigail_so_age =20 AC_SUBST(VERSION_MAJOR) AC_SUBST(VERSION_MINOR) AC_SUBST(VERSION_REVISION) AC_SUBST(ABIXML_VERSION_MAJOR) AC_SUBST(ABIXML_VERSION_MINOR) +AC_SUBST(LIBABIGAIL_SO_CURRENT) +AC_SUBST(LIBABIGAIL_SO_REVISION) +AC_SUBST(LIBABIGAIL_SO_AGE) =20 dnl This VERSION_SUFFIX environment variable is to allow appending dnl arbitrary text to the libabigail version string representation. diff --git a/src/Makefile.am b/src/Makefile.am index 1591224f..1748f0b8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -47,7 +47,7 @@ libabigail_la_SOURCES +=3D abg-ctf-reader.cc endif =20 libabigail_la_LIBADD =3D $(DEPS_LIBS) $(FTS_LIBS) -libabigail_la_LDFLAGS =3D -lpthread -Wl,--as-needed -no-undefined +libabigail_la_LDFLAGS =3D -lpthread -Wl,--as-needed -no-undefined -version= -info $(LIBABIGAIL_SO_CURRENT):$(LIBABIGAIL_SO_REVISION):$(LIBABIGAIL_SO_AG= E) =20 CUSTOM_MACROS =3D -DABIGAIL_ROOT_SYSTEM_LIBDIR=3D\"${libdir}\" =20 --=20 2.37.2 --=20 Dodji