This is the mail archive of the libc-alpha@sources.redhat.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]
Other format: [Raw text]

Re: Add dependencies on libc_nonshared.a for some tests


On Mon, Apr 25, 2005 at 03:33:21PM -0700, Roland McGrath wrote:
> You should make a variable for the common dependencies that go with using
> $(build-module), and change all the rules to use that.  Also, remember that
> some dirs have their own ChangeLogs.

Is this better?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-05-03  Daniel Jacobowitz  <dan@codesourcery.com>

	* extra-modules.mk: Add a build rule.
	* dlfcn/Makefile: Remove $(build-module) rules.
	* elf/Makefile: Likewise.  Create all-modules-names and move
	filtmod1 to there from modules-names.  Use libc_nonshared.a
	for filtmod1.so.

2005-05-03  Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile: Remove $(build-module) rules.

2005-05-03  Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile: Remove $(build-module) rules.

Index: extra-modules.mk
===================================================================
RCS file: /home/drow/rsync/glibc/libc/extra-modules.mk,v
retrieving revision 1.1
diff -u -p -r1.1 extra-modules.mk
--- extra-modules.mk	8 Mar 2004 21:23:37 -0000	1.1
+++ extra-modules.mk	3 May 2005 21:07:35 -0000
@@ -7,3 +7,7 @@ module := $(firstword $(extra-modules-le
 extra-modules-left := $(filter-out $(module),$(extra-modules-left))
 
 CPPFLAGS-$(module).c += -DNOT_IN_libc
+
+$(objpfx)$(module).so: $(objpfx)$(module).os $(common-objpfx)shlib.lds \
+		       $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
+	$(build-module)
Index: dlfcn/Makefile
===================================================================
RCS file: /home/drow/rsync/glibc/libc/dlfcn/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- dlfcn/Makefile	6 Jan 2005 22:40:27 -0000	1.35
+++ dlfcn/Makefile	3 May 2005 21:09:38 -0000
@@ -1,4 +1,5 @@
-# Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1995-2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -66,8 +67,6 @@ generated := $(modules-names:=.so)
 include ../Rules
 
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
-$(test-modules): $(objpfx)%.so: $(objpfx)%.os $(common-objpfx)shlib.lds
-	$(build-module)
 
 ifeq ($(build-shared),yes)
 # Build all the modules even when not actually running test programs.
Index: elf/Makefile
===================================================================
RCS file: /home/drow/rsync/glibc/libc/elf/Makefile,v
retrieving revision 1.301
diff -u -p -r1.301 Makefile
--- elf/Makefile	27 Apr 2005 01:34:16 -0000	1.301
+++ elf/Makefile	3 May 2005 21:02:41 -0000
@@ -177,7 +177,7 @@ modules-names = testobj1 testobj2 testob
 		testobj1_1 failobj constload2 constload3 unloadmod \
 		dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \
 		$(modules-nodelete-$(have-z-nodelete)) \
-		$(modules-nodlopen-$(have-z-nodlopen)) filtmod1 filtmod2 \
+		$(modules-nodlopen-$(have-z-nodlopen)) filtmod2 \
 		reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
 		reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \
 		neededobj1 neededobj2 neededobj3 neededobj4 \
@@ -214,9 +214,14 @@ modules-nodelete-yes = nodelmod1 nodelmo
 		       nodel2mod1 nodel2mod2 nodel2mod3
 modules-nodlopen-yes = nodlopenmod nodlopenmod2
 modules-execstack-yes = tst-execstack-mod
-extra-objs += $(addsuffix .os,$(strip $(modules-names)))
+
+# filtmod1 has a special link rule, so it is not in $(modules-names)
+CPPFLAGS-filtmod1.c += -DNOT_IN_libc
+all-modules-names := $(modules-names) filtmod1
+
+extra-objs += $(addsuffix .os,$(strip $(all-modules-names)))
 # We need this variable to be sure the test modules get the right CPPFLAGS.
-test-extras += $(modules-names)
+test-extras += $(all-modules-names)
 
 include ../Rules
 
@@ -380,8 +385,8 @@ CFLAGS-cache.c = $(SYSCONF-FLAGS)
 
 CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
 
-test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
-generated += $(addsuffix .so,$(strip $(modules-names)))
+test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(all-modules-names))))
+generated += $(addsuffix .so,$(strip $(all-modules-names)))
 
 ifeq (yes,$(build-shared))
 ifeq ($(cross-compiling),no)
@@ -485,10 +490,6 @@ reldep9mod1.so-no-z-defs = yes
 unload3mod4.so-no-z-defs = yes
 unload4mod1.so-no-z-defs = yes
 
-# filtmod1.so has a special rule
-$(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os
-	$(build-module)
-
 ifeq ($(build-shared),yes)
 # Build all the modules even when not actually running test programs.
 tests: $(test-modules)
@@ -594,11 +595,13 @@ $(objpfx)nodlopenmod2.so: $(objpfx)nodlo
 $(objpfx)nodlopen2: $(libdl)
 $(objpfx)nodlopen2.out: $(objpfx)nodlopenmod2.so
 
-$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
+$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so \
+		      $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
 	$(LINK.o) -shared -o $@ -B$(csu-objpfx) $(LDFLAGS.so) \
 		  -L$(subst :, -L,$(rpath-link)) \
 		  -Wl,-rpath-link=$(rpath-link) \
-		  $< -Wl,-F,$(objpfx)filtmod2.so
+		  $< -Wl,-F,$(objpfx)filtmod2.so \
+		  $(common-objpfx)libc_nonshared.a
 $(objpfx)filter: $(objpfx)filtmod1.so
 
 $(objpfx)unload: $(libdl)
Index: linuxthreads/Makefile
===================================================================
RCS file: /home/drow/rsync/glibc/libc/linuxthreads/Makefile,v
retrieving revision 1.98
diff -u -p -r1.98 Makefile
--- linuxthreads/Makefile	7 Feb 2005 19:30:03 -0000	1.98
+++ linuxthreads/Makefile	3 May 2005 20:39:13 -0000
@@ -142,9 +142,6 @@ tst-tls1modd.so-no-z-defs = yes
 tst-tls1mode.so-no-z-defs = yes
 tst-tls1modf.so-no-z-defs = yes
 
-$(test-modules): $(objpfx)%.so: $(objpfx)%.os $(common-objpfx)shlib.lds
-	$(build-module)
-
 ifeq ($(build-shared),yes)
 # Build all the modules even when not actually running test programs.
 tests: $(test-modules)
Index: nptl/Makefile
===================================================================
RCS file: /home/drow/rsync/glibc/libc/nptl/Makefile,v
retrieving revision 1.167
diff -u -p -r1.167 Makefile
--- nptl/Makefile	27 Apr 2005 09:55:18 -0000	1.167
+++ nptl/Makefile	3 May 2005 20:38:26 -0000
@@ -294,9 +294,6 @@ tst-tls5modd.so-no-z-defs = yes
 tst-tls5mode.so-no-z-defs = yes
 tst-tls5modf.so-no-z-defs = yes
 
-$(test-modules): $(objpfx)%.so: $(objpfx)%.os $(common-objpfx)shlib.lds
-	$(build-module)
-
 ifeq ($(build-shared),yes)
 # Build all the modules even when not actually running test programs.
 tests: $(test-modules)


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