about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-11-08 02:28:15 +0000
committerRoland McGrath <roland@gnu.org>1995-11-08 02:28:15 +0000
commit094bacdbd84627791b82db46b095558f34c36831 (patch)
tree0933db773baf1fb98ae99b26b79a1609513f369d
parent86d2c878acad4d2f16d0af6fe6a030b90815362d (diff)
downloadglibc-cvs/libc-951108.tar.gz
glibc-cvs/libc-951108.tar.xz
glibc-cvs/libc-951108.zip
* elf/Makefile (ldd): Make it executable. cvs/libc-951108
	* Makeconfig (config-LDFLAGS): Find dynamic linker in $(slibdir).

	* Makeconfig (slibdir): New variable.
	* Makerules (install): Install libc.so in $(slibdir).
	* elf/Makefile (install-others): Install ld.so and ld-linux.so.1
	in $(slibdir).
-rw-r--r--ChangeLog9
-rw-r--r--Makeconfig9
-rw-r--r--Makerules8
-rw-r--r--elf/Makefile8
4 files changed, 26 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 79a40eec5b..df8bd5f9a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 Tue Nov  7 12:29:46 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
+	* elf/Makefile (ldd): Make it executable.
+
+	* Makeconfig (config-LDFLAGS): Find dynamic linker in $(slibdir).
+
+	* Makeconfig (slibdir): New variable.
+	* Makerules (install): Install libc.so in $(slibdir).
+	* elf/Makefile (install-others): Install ld.so and ld-linux.so.1
+	in $(slibdir).
+
 	* elf/linux-compat.c: New file.
 	* elf/Makefile (distribute): Add linux-compat.c.
 	(generated): Add librtld.so.
diff --git a/Makeconfig b/Makeconfig
index 47c48d4615..e716776cb9 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -56,7 +56,7 @@ objdir = $(ARCH)
 endif
 endif
 
-# $(common-objdir) is the place to put objects and 
+# $(common-objdir) is the place to put objects and
 # such that are not specific to a single subdir.
 ifdef objdir
 objpfx = $(objdir)/
@@ -135,6 +135,11 @@ ifndef libdir
 libdir = $(exec_prefix)/lib
 endif
 
+# Where to install the shared library and dynamic linker.
+ifndef slibdir
+slibdir = $(exec_prefix)/lib
+endif
+
 # Prefix to put on files installed in $(libdir).  For libraries `libNAME.a',
 # the prefix is spliced between `lib' and the name, so the linker switch
 # `-l$(libprefix)NAME' finds the library; for other files the prefix is
@@ -281,7 +286,7 @@ ifndef +link
 endif
 ifndef config-LDFLAGS
 ifeq (yes,$(build-shared))
-config-LDFLAGS = -Wl,-dynamic-linker=$(libdir)/$(rtld-installed-name)
+config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
 endif
 endif
 ifndef link-libc
diff --git a/Makerules b/Makerules
index ac07369998..1ae1384ffa 100644
--- a/Makerules
+++ b/Makerules
@@ -475,12 +475,14 @@ endef
 install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
 install-lib := $(filter-out %.so %_pic.a,$(install-lib))
 ifeq (yes,$(build-shared))
-install: $(libdir)/libc.so$(libc.so-version)
 install-lib-nosubdir: $(foreach so,$(install-lib.so),\
   $(libdir)/$(patsubst $(libprefix)lib%,lib$(libprefix)%,\
 		       $(libprefix)$(so))$($(so)-version))
 
-install-lib.so += libc.so
+install: $(slibdir)/libc.so$(libc.so-version)
+$(slibdir)/lib$(libprefix)c.so$(libc.so-version): $(common-objpfx)libc.so
+	$(do-install-program)
+
 $(foreach v,$(sort $(foreach so,$(install-lib.so),.so$($(so)-version))),\
 	  $(libdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so
 	$(do-install-program)
@@ -646,7 +648,7 @@ $(common-objpfx)stub-$(subdir): $(+depfiles)
 # Make the distribution tar file.
 
 .PHONY: dist
-dist: distinfo $(..)Make-dist 
+dist: distinfo $(..)Make-dist
 	$(MAKE) -f $< -f $(word 2,$^) $(Make-dist-args)
 
 # Avoid depending on source files found in sysdeps dirs,
diff --git a/elf/Makefile b/elf/Makefile
index 314289b893..08288f89d5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -38,12 +38,12 @@ include ../Makeconfig
 ifeq (yes,$(build-shared))
 extra-objs	= $(rtld-routines:=.so) soinit.so sofini.so
 generated	= librtld.so
-install-others	= $(libdir)/$(rtld-installed-name)
+install-others	= $(slibdir)/$(rtld-installed-name)
 install-bin	= ldd
 
 ifneq (,$(filter linux%,$(config-os)))
 extra-objs	+= linux-compat.so
-install-lib	+= ld-linux.so.1
+install-others	+= $(slibdir)/ld-linux.so.1
 endif
 endif
 
@@ -73,8 +73,10 @@ $(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so
 		  $(LDFLAGS.so) $(LDFLAGS-dl.so) \
 		  -Wl,--whole-archive $(^:$(objpfx)%=%)
 
-$(libdir)$(rtld-installed-name): $(objpfx)ld.so; $(do-install-program)
+$(slibdir)/$(rtld-installed-name): $(objpfx)ld.so; $(do-install-program)
+$(slibdir)/ld-linux.so.1: $(objpfx)ld-linux.so.1; $(do-install-program)
 
 $(objpfx)ldd: ldd.sh.in
 	sed 's%@RTLD@%$(libdir)/$(rtld-installed-name)%g' < $< > $@.new
+	chmod 555 $@.new
 	mv -f $@.new $@