From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 2/4] Makerules: Remove lib-version, $(subdir-version)
Date: Thu, 10 Jun 2021 10:23:07 +0200 [thread overview]
Message-ID: <6f0697cc5bf2ed21b74e0e43f2fda120c7993127.1623312996.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1623312996.git.fweimer@redhat.com>
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.
---
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)
--
2.31.1
next prev parent reply other threads:[~2021-06-10 8:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 8:22 [PATCH 0/4] Do not install shared objects under versioned names Florian Weimer
2021-06-10 8:23 ` [PATCH 1/4] nptl_db: Install libthread_db under a regular implementation name Florian Weimer
2021-06-27 21:32 ` Carlos O'Donell
2021-06-10 8:23 ` Florian Weimer [this message]
2021-06-27 21:32 ` [PATCH 2/4] Makerules: Remove lib-version, $(subdir-version) Carlos O'Donell
2021-06-10 8:23 ` [PATCH 3/4] elf: Generalize name-based DSO recognition in ldconfig Florian Weimer
2021-06-27 21:32 ` Carlos O'Donell
2021-06-10 8:23 ` [PATCH 4/4] Install shared objects under their ABI names Florian Weimer
2021-06-27 21:32 ` Carlos O'Donell
2021-06-14 11:04 ` [PATCH 0/4] Do not install shared objects under versioned names Florian Weimer
2021-06-14 14:49 ` Siddhesh Poyarekar
2021-06-27 20:43 ` Carlos O'Donell
2021-06-28 3:42 ` Siddhesh Poyarekar
2021-06-27 21:31 ` Carlos O'Donell
-- strict thread matches above, loose matches on Subject: below --
2021-06-09 11:15 [PATCH 0/4] Add --disable-major-minor-libraries configure option Florian Weimer
2021-06-09 11:16 ` [PATCH 2/4] Makerules: Remove lib-version, $(subdir-version) Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f0697cc5bf2ed21b74e0e43f2fda120c7993127.1623312996.git.fweimer@redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).