This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libc-19980524: unnecessary startup file dependencies on Hurd


Hi All,

Here is the promised patch that removes `interp.os' for `libmachuser.so'
and `libhurduser.so'.  It substitutes a new make variable `+interp'
for `interp-obj', which is very similar to `+preinit' and
`+postinit'.  It works under Linux (all libraries that had a .interp
section before the change still have it), and seems to be working for
the Hurd (at least the two libraries mentioned before compile without
problems).

Mark


1998-05-27  Mark Kettenis  <kettenis@phys.uva.nl>

	* Makeconfig [elf=yes] (+interp): New variable, set to interp.os.
	* Makerules (lib%.so): Depend on $(+interp).
	(libc.so): Add interp.os to list of dependencies.
	(interp-obj): Remove variable.
	* mach/Machrules (+interp): Define to empty since libhurduser and
	libmachuser don't need to have the interpreter set.


Index: mach/Machrules
--- mach/Machrules.orig Wed, 27 May 1998 22:59:51 +0200 kettenis (libc/1_Machrules 1.1 640) 0.1
+++ mach/Machrules      Wed, 27 May 1998 23:00:55 +0200 kettenis (libc/1_Machrules 1.2 640) local.1
@@ -213,6 +213,7 @@
 # produce a bogus libmachuser.so.
 +preinit = 
 +postinit = 
++interp =
 interface.so = $(interface-library:lib%=%.so)
 LDFLAGS-$(interface.so) = -nostdlib -nostartfiles
 
Index: Makeconfig
--- Makeconfig.orig Wed, 27 May 1998 22:59:51 +0200 kettenis (libc/2_Makeconfig 1.1 640) 0.1
+++ Makeconfig      Wed, 27 May 1998 23:00:55 +0200 kettenis (libc/2_Makeconfig 1.2 640) local.1
@@ -457,6 +457,7 @@
 +postinit = $(addprefix $(csu-objpfx),crtn.o)
 +prector = `$(CC) --print-file-name=crtbegin.o`
 +postctor = `$(CC) --print-file-name=crtend.o`
++interp = $(addprefix $(elf-objpfx),interp.os)
 endif
 csu-objpfx = $(common-objpfx)csu/
 elf-objpfx = $(common-objpfx)elf/
Index: Makerules
--- Makerules.orig Wed, 27 May 1998 22:59:51 +0200 kettenis (libc/3_Makerules 1.1 640) 0.1
+++ Makerules      Wed, 27 May 1998 23:00:55 +0200 kettenis (libc/3_Makerules 1.2 640) local.1
@@ -335,15 +335,9 @@
 # build shared libraries in place from the installed *_pic.a files.
 # $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
 # on other shared objects.
-lib%.so: lib%_pic.a $(+preinit) $(+postinit)
+lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp)
 	$(build-shlib)
 
-ifeq ($(elf),yes)
-interp-obj = $(common-objpfx)elf/interp.os
-$(common-objpfx)libc.so: $(interp-obj)
-$(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj)
-endif
-
 define build-shlib
 $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
 	  -B$(csu-objpfx) $(load-map-file) \
@@ -390,7 +384,8 @@
 # Use our own special initializer and finalizer files for libc.so.
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
 			 $(common-objpfx)libc_pic.os \
-			 $(elfobjdir)/sofini.os $(elfobjdir)/ld.so \
+			 $(elfobjdir)/sofini.os \
+			 $(elfobjdir)/interp.os $(elfobjdir)/ld.so \
 			 $(..)libc.map
 	$(build-shlib)
 common-generated += libc.so libc_pic.os


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]