Message ID | 20220628222600.1362127-1-woodard@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <libabigail-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC6E33856268 for <patchwork@sourceware.org>; Tue, 28 Jun 2022 22:26:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC6E33856268 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656455182; bh=w1WwWiBF2V3W0r44ENRJ3HJWT2IQRPHq26YxgtqSGDU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=ouH1EKhi0gbXNakVoJNwWTyyIFlmUR65+gtCqDNVcV3AwT/S4SqPBy76DzJZ1g0iG bskg6SXXcQcRN30Kg7y7HiWbt8nKRSeNhAF3XtqBKhKDymok4Esd4AizAkLgHDK5fM 98wKaDK3VnbpRgqLL0ZpX7iMOma5z/6QM/xSgKpQ= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E5946385AE5B for <libabigail@sourceware.org>; Tue, 28 Jun 2022 22:26:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5946385AE5B Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-313-o2Q_awQ1Otinv9hXtWABww-1; Tue, 28 Jun 2022 18:26:16 -0400 X-MC-Unique: o2Q_awQ1Otinv9hXtWABww-1 Received: by mail-pg1-f198.google.com with SMTP id e18-20020a656492000000b003fa4033f9a7so7286148pgv.17 for <libabigail@sourceware.org>; Tue, 28 Jun 2022 15:26:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w1WwWiBF2V3W0r44ENRJ3HJWT2IQRPHq26YxgtqSGDU=; b=kelG16nlAb9VVXu+uEMJzS4mHKyfsba2ifU3KBKnqmX18ss0+eQbGzcr1E2eNZTmiA +LnALn5CP7hFLNiWFa+Vf9Xh1hgWmoYU/buOtR76UlIPmZXBDqVOCq3irA95W2VbepxI nQuACzYujMOgvRqmscak7wGSjr+3NuEIOZEuG4r/ZeU7d91K9+AsSeIe+d0TilWd0sRr UXFSfIngZ6TlCOD8pchhwMDQbskMvAZ37D5tRCRUWaQnNFJ5SmJ0vNMZeszfILxPMFWN e+cDA/NNXoXnXeQPE/DKx0vQutiBSugvnmlNBoE62czHiTlvSRPsmWh0kkcsDT6vUuk3 2G9w== X-Gm-Message-State: AJIora/TH5OzKdYGKXu36RfdGLzucjhziSXeKlWfsJOSWQsSBx6WlIrC piCXPnm2ml9vWjUBRVZeXPYXQuIh6NhpeluMivXD9OPDmnutgAGb9BHlNgXbmY6UdIl+mjprcwx K+KtAT6VlE8O/139P5f0WNoAmGOfVI4+dX0laZeMymBrkOdJc7JnQqWWg3JHP3vtRlZffwwY= X-Received: by 2002:a17:90b:3842:b0:1ed:16aa:def6 with SMTP id nl2-20020a17090b384200b001ed16aadef6mr2137179pjb.130.1656455175116; Tue, 28 Jun 2022 15:26:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCw92DJzurSORXWIdN6yfgCwAPnnYtCaLhYjIH7jMJBDD7mln1lt+HibavWlWSzWnb4bpAHQ== X-Received: by 2002:a17:90b:3842:b0:1ed:16aa:def6 with SMTP id nl2-20020a17090b384200b001ed16aadef6mr2137127pjb.130.1656455174561; Tue, 28 Jun 2022 15:26:14 -0700 (PDT) Received: from alien.localdomain ([47.208.199.57]) by smtp.gmail.com with ESMTPSA id r7-20020a17090a690700b001ec9f9fe028sm371030pjj.46.2022.06.28.15.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 15:26:14 -0700 (PDT) To: libabigail@sourceware.org Subject: [PATCH] Bug 28669 Increment Library version Date: Tue, 28 Jun 2022 15:26:00 -0700 Message-Id: <20220628222600.1362127-1-woodard@redhat.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> From: Ben Woodard via Libabigail <libabigail@sourceware.org> Reply-To: Ben Woodard <woodard@redhat.com> Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" <libabigail-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Bug 28669 Increment Library version
|
|
Commit Message
Ben Woodard
June 28, 2022, 10:26 p.m. UTC
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.
Signed-off-by: Ben Woodard <woodard@redhat.com>
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello, Ben Woodard via Libabigail <libabigail@sourceware.org> a écrit: > 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, From 2bfea52331211cf16fba00d4d2a40f9bbc679cf8 Mon Sep 17 00:00:00 2001 From: Ben Woodard via Libabigail <libabigail@sourceware.org> 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 <woodard@redhat.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> --- 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]) +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 +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 +dnl 3. If any interfaces have been added since the last public release, +dnl then increment LIBABIGAIL_SO_AGE. +dnl +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=version_minor VERSION_REVISION=0 ABIXML_VERSION_MAJOR=2 ABIXML_VERSION_MINOR=1 +LIBABIGAIL_SO_CURRENT=libabigail_so_current +LIBABIGAIL_SO_REVISION=libabigail_so_revision +LIBABIGAIL_SO_AGE=libabigail_so_age 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) 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 += abg-ctf-reader.cc endif libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS) -libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined +libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined -version-info $(LIBABIGAIL_SO_CURRENT):$(LIBABIGAIL_SO_REVISION):$(LIBABIGAIL_SO_AGE) CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\"
diff --git a/src/Makefile.am b/src/Makefile.am index 1591224f..3dc5379b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -47,7 +47,7 @@ libabigail_la_SOURCES += abg-ctf-reader.cc endif libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS) -libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined +libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined -version-info 1:0:0 CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\"