This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
According to FHS, non-essential libraries should be installed in /usr/lib. This patch implements that and moves libSegFault.so, libmemusage.so, libpcprofile.so and libthread_db.so* to $(libdir). 2001-04-02 Andreas Schwab <schwab@suse.de> * extra-lib.mk: If a library occurs in $(extra-libs-slib) add it to install-slib, otherwise to install-lib. * Makerules: Handle install-slib for libraries to be installed in $(slibdir), and install libraries from $(install-lib) in $(libdir). * crypt/Makefile: Define extra-libs-slib. * dlfcn/Makefile: Likewise. * hesiod/Makefile: Likewise. * linuxthreads/Makefile: Likewise. * locale/Makefile: Likewise. * login/Makefile: Likewise. * math/Makefile: Likewise. * nis/Makefile: Likewise. * nss/Makefile: Likewise. * resolv/Makefile: Likewise. * rt/Makefile: Likewise. Index: Makerules =================================================================== RCS file: /cvs/glibc/libc/Makerules,v retrieving revision 1.348 diff -u -a -r1.348 Makerules --- Makerules 2001/03/19 01:21:20 1.348 +++ Makerules 2001/04/02 11:50:21 @@ -603,7 +603,7 @@ $(objects))) \ $(addprefix $(objpfx),$(o-objects$o)) -others: $(addprefix $(objpfx),$(install-lib)) +others: $(addprefix $(objpfx),$(install-lib) $(install-slib)) ifndef objects @@ -670,12 +670,13 @@ .PHONY: force-install force-install: -# $(install-lib) are installed from the object directory into $(libdir); -# files in $(install-lib) matching `lib%.a' are ranlib'd after installation -# unless they also appear in $(non-lib.a). $(install-data) are installed -# as they are into $(datadir). $(headers) are installed as they are in -# $(includedir). $(install-bin) and $(install-sbin) are installed from the -# object directory into $(bindir) and $(sbindir), respectively. +# $(install-lib) and $(install-slib) are installed from the object +# directory into $(libdir) and $(slibdir), respectively; files in +# $(install-lib) matching `lib%.a' are ranlib'd after installation unless +# they also appear in $(non-lib.a). $(install-data) are installed as they +# are into $(datadir). $(headers) are installed as they are in +# $(includedir). $(install-bin) and $(install-sbin) are installed from +# the object directory into $(bindir) and $(sbindir), respectively. # $(install-others) are absolute path names of files to install; rules to # install them are defined elsewhere. @@ -718,23 +719,34 @@ install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so)) install-lib := $(filter-out %.so %_pic.a,$(install-lib)) +install-slib.so := $(filter %.so,$(install-slib:%_pic.a=%.so)) +install-slib := $(filter-out %.so %_pic.a,$(install-slib)) ifeq (yes,$(build-shared)) # Find which .so's have versions. -versioned := $(strip $(foreach so,$(install-lib.so),\ - $(patsubst %,$(so),$($(so)-version)))) +versioned.lib := $(strip $(foreach so,$(install-lib.so),\ + $(patsubst %,$(so),$($(so)-version)))) +versioned.slib := $(strip $(foreach so,$(install-slib.so),\ + $(patsubst %,$(so),$($(so)-version)))) + +install-lib.so-versioned := $(filter $(versioned.lib),$(install-lib.so)) \ + $(filter $(versioned.slib),$(install-slib.so)) +install-lib.so-unversioned := $(filter-out $(versioned.lib),$(install-lib.so)) +install-slib.so-unversioned := $(filter-out $(versioned.slib),$(install-slib.so)) -install-lib.so-versioned := $(filter $(versioned), $(install-lib.so)) -install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so)) - install-lib-nosubdir: $(install-lib.so-versioned:%=$(inst_libdir)/%) \ - $(install-lib.so-unversioned:%=$(inst_slibdir)/%) + $(install-lib.so-unversioned:%=$(inst_libdir)/%) \ + $(install-slib.so-unversioned:%=$(inst_slibdir)/%) # Install all the unversioned shared libraries. -$(install-lib.so-unversioned:%=$(inst_slibdir)/%): $(inst_slibdir)/%.so: \ +$(install-lib.so-unversioned:%=$(inst_libdir)/%): $(inst_libdir)/%.so: \ $(objpfx)%.so $(+force) $(do-install-program) +$(install-slib.so-unversioned:%=$(inst_slibdir)/%): $(inst_slibdir)/%.so: \ + $(objpfx)%.so $(+force) + $(do-install-program) + ifneq ($(findstring -s,$(LN_S)),) define make-link rm -f $@.new @@ -810,56 +822,108 @@ $(do-install-program) endif -ifneq (,$(versioned)) +ifneq (,$(versioned.lib)$(versioned.slib)) # Produce three sets of rules as above for all the smaller versioned libraries. +ifneq (,$(versioned.slib)) define o-iterator-doit $(inst_libdir)/$o: $(inst_slibdir)/$o$($o-version) $(+force); $$(make-link) +endef +object-suffixes-left := $(versioned.slib) +include $(o-iterator) +endif + +ifneq (,$(versioned.lib)) +define o-iterator-doit +$(inst_libdir)/$o: $(inst_libdir)/$o$($o-version) $(+force); $$(make-link) endef -object-suffixes-left := $(versioned) +object-suffixes-left := $(versioned.lib) include $(o-iterator) +endif # Make symlinks in the build directory, because the versioned names might # be referenced by a DT_NEEDED in another library. define o-iterator-doit $(objpfx)$o$($o-version): $(objpfx)$o; $$(make-link) endef -object-suffixes-left := $(versioned) +object-suffixes-left := $(versioned.slib) $(versioned.lib) include $(o-iterator) -generated += $(foreach o,$(versioned),$o$($o-version)) +generated += $(foreach o,$(versioned.slib) $(versioned.lib),$o$($o-version)) ifeq (,$($(subdir)-version)) + +ifneq (,$(versioned.slib)) define o-iterator-doit $(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so \ $(+force); $$(make-shlib-link) endef -object-suffixes-left := $(versioned) +object-suffixes-left := $(versioned.slib) include $(o-iterator) define o-iterator-doit $(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o $(+force); $$(do-install-program) +endef +object-suffixes-left := $(versioned.slib) +include $(o-iterator) +endif + +ifneq (,$(versioned.lib)) +define o-iterator-doit +$(inst_libdir)/$o$($o-version): $(inst_libdir)/$(o:.so=)-$(version).so \ + $(+force); + $$(make-shlib-link) +endef +object-suffixes-left := $(versioned.lib) +include $(o-iterator) + +define o-iterator-doit +$(inst_libdir)/$(o:.so=)-$(version).so: $(objpfx)$o $(+force); + $$(do-install-program) endef -object-suffixes-left := $(versioned) +object-suffixes-left := $(versioned.lib) include $(o-iterator) +endif + else + +ifneq (,$(versioned.slib)) 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) +object-suffixes-left := $(versioned.slib) 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) +object-suffixes-left := $(versioned.slib) include $(o-iterator) endif + +ifneq (,$(versioned.lib)) +define o-iterator-doit +$(inst_libdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o $(+force); + $$(do-install-program) +endef +object-suffixes-left := $(versioned.lib) +include $(o-iterator) + +define o-iterator-doit +$(inst_libdir)/$o$($o-version): \ + $(inst_libdir)/$(o:.so=)-$($(subdir)-version).so $(+force); + $$(make-shlib-link) +endef +object-suffixes-left := $(versioned.lib) +include $(o-iterator) +endif + +endif endif define do-install-so @@ -868,13 +932,16 @@ $(filter-out %.so,$@)) endef -so-versions := $(sort $(foreach so,$(install-lib.so),.so$($(so)-version))) +so-versions := $(sort $(foreach so,$(install-slib.so) $(install-lib.so),\ + .so$($(so)-version))) $(foreach v,$(so-versions),\ - $(inst_slibdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so \ - $(+force) + $(inst_slibdir)/lib$(libprefix)%$v \ + $(inst_libdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so \ + $(+force) $(do-install-so) $(foreach v,$(so-versions),\ - $(inst_slibdir)/$(libprefix)%$v): $(common-objpfx)%.so $(+force) + $(inst_slibdir)/$(libprefix)%$v \ + $(inst_libdir)/$(libprefix)%$v): $(common-objpfx)%.so $(+force) $(do-install-so) endif Index: extra-lib.mk =================================================================== RCS file: /cvs/glibc/libc/extra-lib.mk,v retrieving revision 1.24 diff -u -a -r1.24 extra-lib.mk --- extra-lib.mk 1999/07/20 08:14:55 1.24 +++ extra-lib.mk 2001/04/02 11:50:30 @@ -16,13 +16,18 @@ # Make sure these are simply-expanded variables before we append to them, # since we want the expressions we append to be expanded right now. install-lib := $(install-lib) +install-slib := $(install-slib) extra-objs := $(extra-objs) # The modules that go in $(lib). all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines) # Add each flavor of library to the lists of things to build and install. +ifneq (,$(filter $(lib),$(extra-libs-slib))) +install-slib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +else install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +endif extra-objs += $(foreach o,$(object-suffixes-$(lib):.os=),\ $(patsubst %,%$o,$(filter-out \ $($(lib)-shared-only-routines),\ Index: crypt/Makefile =================================================================== RCS file: /cvs/glibc/libc/crypt/Makefile,v retrieving revision 1.8 diff -u -a -r1.8 crypt/Makefile --- crypt/Makefile 2001/03/18 21:32:55 1.8 +++ crypt/Makefile 2001/04/02 11:50:30 @@ -26,6 +26,7 @@ distribute := md5.h extra-libs := libcrypt +extra-libs-slib := $(extra-libs) extra-libs-others := $(extra-libs) libcrypt-routines := crypt-entry md5-crypt md5 crypt crypt_util Index: dlfcn/Makefile =================================================================== RCS file: /cvs/glibc/libc/dlfcn/Makefile,v retrieving revision 1.14 diff -u -a -r1.14 dlfcn/Makefile --- dlfcn/Makefile 2001/03/18 21:32:57 1.14 +++ dlfcn/Makefile 2001/04/02 11:50:30 @@ -19,12 +19,13 @@ subdir := dlfcn headers := bits/dlfcn.h dlfcn.h extra-libs := libdl +extra-libs-slib := $(extra-libs) libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr eval distribute := dlopenold.c glreflib1.c glreflib2.c failtestmod.c eval.c \ defaultmod1.c defaultmod2.c errmsg1mod.c modatexit.c \ modcxaatexit.c -extra-libs-others := libdl +extra-libs-others := $(extra-libs) include ../Makeconfig Index: hesiod/Makefile =================================================================== RCS file: /cvs/glibc/libc/hesiod/Makefile,v retrieving revision 1.7 diff -u -a -r1.7 hesiod/Makefile --- hesiod/Makefile 2001/03/18 21:32:58 1.7 +++ hesiod/Makefile 2001/04/02 11:50:30 @@ -24,6 +24,7 @@ distribute := hesiod.h hesiod_p.h README.hesiod nss_hesiod/nss_hesiod.h extra-libs := libnss_hesiod +extra-libs-slib = $(extra-libs) extra-libs-others = $(extra-libs) subdir-dirs = nss_hesiod Index: linuxthreads/Makefile =================================================================== RCS file: /cvs/glibc/libc/linuxthreads/Makefile,v retrieving revision 1.37 diff -u -a -r1.37 linuxthreads/Makefile --- linuxthreads/Makefile 2001/03/21 18:46:27 1.37 +++ linuxthreads/Makefile 2001/04/02 11:50:49 @@ -30,6 +30,7 @@ routines := weaks no-tsd extra-libs := libpthread +extra-libs-slib := $(extra-libs) extra-libs-others := $(extra-libs) libpthread-routines := attr cancel condvar join manager mutex ptfork \ Index: locale/Makefile =================================================================== RCS file: /cvs/glibc/libc/locale/Makefile,v retrieving revision 1.57 diff -u -a -r1.57 locale/Makefile --- locale/Makefile 2001/03/18 21:33:01 1.57 +++ locale/Makefile 2001/04/02 11:50:49 @@ -48,6 +48,7 @@ $(lib-modules:=.o) extra-libs = libBrokenLocale +extra-libs-slib = $(extra-libs) extra-libs-others = $(extra-libs) libBrokenLocale-routines = broken_cur_max Index: login/Makefile =================================================================== RCS file: /cvs/glibc/libc/login/Makefile,v retrieving revision 1.32 diff -u -a -r1.32 login/Makefile --- login/Makefile 2001/03/18 21:33:02 1.32 +++ login/Makefile 2001/04/02 11:50:49 @@ -41,6 +41,7 @@ # Build the -lutil library with these extra functions. extra-libs := libutil +extra-libs-slib := $(extra-libs) extra-libs-others := $(extra-libs) libutil-routines:= login login_tty logout logwtmp openpty forkpty Index: math/Makefile =================================================================== RCS file: /cvs/glibc/libc/math/Makefile,v retrieving revision 1.105 diff -u -a -r1.105 math/Makefile --- math/Makefile 2001/03/18 21:33:03 1.105 +++ math/Makefile 2001/04/02 11:50:49 @@ -34,6 +34,7 @@ # Build the -lm library. extra-libs := libm +extra-libs-slib = $(extra-libs) extra-libs-others = $(extra-libs) libm-support = k_standard s_lib_version s_matherr s_signgam \ Index: nis/Makefile =================================================================== RCS file: /cvs/glibc/libc/nis/Makefile,v retrieving revision 1.24 diff -u -a -r1.24 nis/Makefile --- nis/Makefile 2001/03/18 21:33:04 1.24 +++ nis/Makefile 2001/04/02 11:50:49 @@ -34,6 +34,7 @@ services := nis nisplus compat extra-libs = libnsl $(services:%=libnss_%) +extra-libs-slib = $(extra-libs) # These libraries will be built in the `others' pass rather than # the `lib' pass, because they depend on libc.so being built already. extra-libs-others = $(extra-libs) Index: nss/Makefile =================================================================== RCS file: /cvs/glibc/libc/nss/Makefile,v retrieving revision 1.41 diff -u -a -r1.41 nss/Makefile --- nss/Makefile 2001/03/18 21:33:05 1.41 +++ nss/Makefile 2001/04/02 11:50:49 @@ -52,6 +52,7 @@ services := files extra-libs = $(services:%=libnss_%) +extra-libs-slib = $(extra-libs) # These libraries will be built in the `others' pass rather than # the `lib' pass, because they depend on libc.so being built already. extra-libs-others = $(extra-libs) Index: resolv/Makefile =================================================================== RCS file: /cvs/glibc/libc/resolv/Makefile,v retrieving revision 1.38 diff -u -a -r1.38 resolv/Makefile --- resolv/Makefile 2001/03/18 21:33:06 1.38 +++ resolv/Makefile 2001/04/02 11:50:49 @@ -40,6 +40,7 @@ extra-libs += libanl routines += gai_sigqueue endif +extra-libs-slib = $(extra-libs) extra-libs-others = $(extra-libs) libresolv-routines := gethnamaddr res_comp res_debug \ res_data res_mkquery res_query res_send \ Index: rt/Makefile =================================================================== RCS file: /cvs/glibc/libc/rt/Makefile,v retrieving revision 1.21 diff -u -a -r1.21 rt/Makefile --- rt/Makefile 2001/03/18 21:33:06 1.21 +++ rt/Makefile 2001/04/02 11:50:49 @@ -44,6 +44,7 @@ tst-aio4 tst-aio5 tst-aio6 extra-libs := librt +extra-libs-slib := $(extra-libs) extra-libs-others := $(extra-libs) endif -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |