From patchwork Thu Jun 10 08:23:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 43804 Return-Path: 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 653693AAA0A7 for ; Thu, 10 Jun 2021 08:24:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 653693AAA0A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623313492; bh=ud+/FOYUPzAD4cP/FMTIiVSepapuR0lmTAizs3ow3x0=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=SL/7DvrBtKFNEa+ZtGYpiVl2OWOeTCDc9ZH87GAk1h/72rdmqXJCJToDEMV9RW5qM Ywk2456P8WOPBSqDG2jaW0r+y4A5fJcfo3yf+JNsug0a1YvZFIrYEVfcs7GnVRmrZ2 5LAn2dCnIHk2VGmaiWKWNMsnsOJF3cD46X02Thvk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 1F2B3389683C for ; Thu, 10 Jun 2021 08:23:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F2B3389683C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371-LXy_VLMmO6OcOyoDvsFoew-1; Thu, 10 Jun 2021 04:23:10 -0400 X-MC-Unique: LXy_VLMmO6OcOyoDvsFoew-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC51A1012591 for ; Thu, 10 Jun 2021 08:23:09 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-60.ams2.redhat.com [10.36.115.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E8035D6AD for ; Thu, 10 Jun 2021 08:23:09 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 2/4] Makerules: Remove lib-version, $(subdir-version) In-Reply-To: References: X-From-Line: 6f0697cc5bf2ed21b74e0e43f2fda120c7993127 Mon Sep 17 00:00:00 2001 Message-Id: <6f0697cc5bf2ed21b74e0e43f2fda120c7993127.1623312996.git.fweimer@redhat.com> Date: Thu, 10 Jun 2021 10:23:07 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.6 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, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Also clarify that the “versioned” term refers to the soname, not the glibc version (which also ends up in the installed file name). I verified on x86_64-linux-gnu that “make install” produces the same files. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- Makerules | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/Makerules b/Makerules index ca9885436e..d3f29d0b89 100644 --- a/Makerules +++ b/Makerules @@ -982,22 +982,21 @@ install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so)) install-lib := $(filter-out %.so %_pic.a,$(install-lib)) ifeq (yes,$(build-shared)) -# Find which .so's have versions. +# Find which .so's have a version number in their soname. versioned := $(strip $(foreach so,$(install-lib.so),\ $(patsubst %,$(so),$($(so)-version)))) install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) -# For versioned libraries, we install three files: +# For libraries whose soname have version numbers, we install three files: # $(inst_libdir)/libfoo.so -- for linking, symlink or ld script # $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink # $(inst_slibdir)/libfoo-X.Y.Z.so -- the real shared object file -lib-version := $(firstword $($(subdir)-version) $(version)) install-lib-nosubdir: $(install-lib.so-unversioned:%=$(inst_slibdir)/%) \ $(foreach L,$(install-lib.so-versioned),\ $(inst_libdir)/$L \ - $(inst_slibdir)/$(L:.so=)-$(lib-version).so \ + $(inst_slibdir)/$(L:.so=)-$(version).so \ $(inst_slibdir)/$L$($L-version)) # Install all the unversioned shared libraries. @@ -1125,7 +1124,6 @@ include $(o-iterator) generated += $(foreach o,$(versioned),$o$($o-version)) -ifeq (,$($(subdir)-version)) define o-iterator-doit $(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so \ $(+force); @@ -1140,23 +1138,7 @@ $(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o $(+force); endef object-suffixes-left := $(versioned) include $(o-iterator) -else -define o-iterator-doit -$(inst_slibdir)/$o$($o-version): \ - $(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so $(+force); - $$(make-shlib-link) -endef -object-suffixes-left := $(versioned) -include $(o-iterator) - -define o-iterator-doit -$(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o $(+force); - $$(do-install-program) -endef -object-suffixes-left := $(versioned) -include $(o-iterator) -endif -endif +endif # ifneq (,$(versioned)) define do-install-so $(do-install-program)