This is the mail archive of the libc-alpha@sourceware.org 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]

Don't build some test objects along with glibc


When glibc is built, some object files used in shared objects for
testcases are built, but most object files used in testcases aren't
built until "make check" time.

Building these objects along with glibc when they are only needed for
testing seems wasteful.  This patch causes the test objects to be
built at test time instead.  The problem objects are those added to
extra-objs: this patch moves them to a separate extra-test-objs.

2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>

	* Makerules (depfiles): Handle extra-test-objs the same as
	extra-objs.
	(common-mostlyclean): Likewise.
	* dlfcn/Makefile (extra-objs): Add modules to extra-test-objs
	instead.
	* elf/Makefile (extra-objs): Likewise.
	* stdlib/Makefile (extra-objs): Likewise.

nptl:
2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>

	* Makefile (extra-objs): Add modules to extra-test-objs instead.

Index: Makerules
===================================================================
RCS file: /cvs/glibc/libc/Makerules,v
retrieving revision 1.444
diff -u -r1.444 Makerules
--- Makerules	1 Mar 2006 04:20:13 -0000	1.444
+++ Makerules	30 Jul 2006 19:30:26 -0000
@@ -688,6 +688,7 @@
 
 +depfiles := $(sources:.c=.d) \
 	     $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
+	     $(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
 	     $(addsuffix .d,$(tests) $(xtests) $(test-srcs))
 ifeq ($(build-programs),yes)
 +depfiles += $(addsuffix .d,$(others) $(sysdep-others))
@@ -1369,8 +1370,8 @@
 						      $(test-srcs)) \
 				     $(addsuffix -bp.out,$(tests) $(xtests) \
 							 $(test-srcs)))
-	-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib) \
-				     $(install-lib.so) \
+	-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
+				     $(install-lib) $(install-lib.so) \
 				     $(install-lib.so:%.so=%_pic.a))
 	-rm -f core
 	-rm -f $(objpfx)rtld-*.os
Index: dlfcn/Makefile
===================================================================
RCS file: /cvs/glibc/libc/dlfcn/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- dlfcn/Makefile	28 Jul 2006 17:37:26 -0000	1.39
+++ dlfcn/Makefile	30 Jul 2006 19:30:26 -0000
@@ -63,7 +63,7 @@
 tststatic2-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
 endif
 
-extra-objs += $(modules-names:=.os)
+extra-test-objs += $(modules-names:=.os)
 generated := $(modules-names:=.so)
 
 include ../Rules
Index: elf/Makefile
===================================================================
RCS file: /cvs/glibc/libc/elf/Makefile,v
retrieving revision 1.312
diff -u -r1.312 Makefile
--- elf/Makefile	19 Mar 2006 07:47:47 -0000	1.312
+++ elf/Makefile	30 Jul 2006 19:30:27 -0000
@@ -223,7 +223,7 @@
 		       nodel2mod1 nodel2mod2 nodel2mod3
 modules-nodlopen-yes = nodlopenmod nodlopenmod2
 modules-execstack-yes = tst-execstack-mod
-extra-objs += $(addsuffix .os,$(strip $(modules-names)))
+extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
 # We need this variable to be sure the test modules get the right CPPFLAGS.
 test-extras += $(modules-names)
 
Index: nptl/Makefile
===================================================================
RCS file: /cvs/glibc/libc/nptl/Makefile,v
retrieving revision 1.181
diff -u -r1.181 Makefile
--- nptl/Makefile	29 Jul 2006 04:38:54 -0000	1.181
+++ nptl/Makefile	30 Jul 2006 19:30:28 -0000
@@ -297,7 +297,7 @@
 		tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
 		tst-tls5modd tst-tls5mode tst-tls5modf \
 		tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod
-extra-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o
+extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o
 test-extras += $(modules-names)
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
 
Index: stdlib/Makefile
===================================================================
RCS file: /cvs/glibc/libc/stdlib/Makefile,v
retrieving revision 1.108
diff -u -r1.108 Makefile
--- stdlib/Makefile	28 Feb 2006 07:06:04 -0000	1.108
+++ stdlib/Makefile	30 Jul 2006 19:30:28 -0000
@@ -86,7 +86,7 @@
 distribute := $(distribute) $(mpn-headers) fpioconst.h tst-putenvmod.c
 
 tests-extras += tst-putenvmod
-extra-objs += tst-putenvmod.os
+extra-test-objs += tst-putenvmod.os
 
 generated += isomac isomac.out tst-putenvmod.so
 

-- 
Joseph S. Myers
joseph@codesourcery.com


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