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]

[PATCH] Fix missing dependencies and ensure correct CPPFLAGS


2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>

	* elf/Makefile (tlsmod17a-modules, tlsmod18a-modules): Define.
	(modules-names): Use them.
	(ifunc-test-modules, ifunc-pie-tests): Define.
	(extra-test-objs): Add tlsmod17a-modules, tlsmod18a-modules,
	tst-pie1, ifunc-test-modules and ifunc-pie-tests objects.
	(test-extras): Likewise.
	($(patsubst %,$(objpfx)%.os,$(tlsmod17a-modules))): Use
	$(compile-command.c).
	($(patsubst %,$(objpfx)%.os,$(tlsmod18a-modules))): Likewise.
	(all-built-dso): Define.
	(check-textrel.out, check-execstack.out): Depend on it.

nptl/:

2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>

	* Makefile (test-extras): Add tst-cleanup4aux.
---
 elf/Makefile  |   54 ++++++++++++++++++++++++++++++++----------------------
 nptl/Makefile |    2 +-
 2 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/elf/Makefile b/elf/Makefile
index 75a7436..7430127 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -214,6 +214,10 @@ tests: $(objpfx)tst-leaks1-mem
 endif
 tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
+tlsmod17a-modules = $(addprefix tst-tlsmod17a, $(tlsmod17a-suffixes))
+tlsmod18a-modules = $(addprefix tst-tlsmod18a, $(tlsmod17a-suffixes))
+extra-test-objs += $(tlsmod17a-modules:=.os) $(tlsmod18a-modules:=.os)
+test-extras += tst-tlsmod17a tst-tlsmod18a
 modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		testobj1_1 failobj constload2 constload3 unloadmod \
 		dep1 dep2 dep3 dep4 vismod1 vismod2 vismod3 \
@@ -233,9 +237,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
 		tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
 		tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \
-		$(patsubst %,tst-tlsmod17a%,$(tlsmod17a-suffixes)) \
-		tst-tlsmod17b \
-		$(patsubst %,tst-tlsmod18a%,$(tlsmod18a-suffixes)) \
+		$(tlsmod17a-modules) tst-tlsmod17b $(tlsmod18a-modules) \
 		circlemod1 circlemod1a circlemod2 circlemod2a \
 		circlemod3 circlemod3a \
 		reldep8mod1 reldep8mod2 reldep8mod3 \
@@ -256,6 +258,8 @@ modules-names += tst-array2dep tst-array5dep
 endif
 ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
+extra-test-objs += tst-pie1.o
+test-extras += tst-pie1
 endif
 ifeq (x86_64,$(config-machine))
 modules-names += tst-auditmod3a tst-auditmod3b \
@@ -285,10 +289,16 @@ tests += ifuncmain1 ifuncmain1pic ifuncmain1vis ifuncmain1vispic \
 	 ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \
 	 ifuncmain5 ifuncmain5pic ifuncmain5staticpic \
 	 ifuncmain7 ifuncmain7pic
+ifunc-test-modules = ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \
+		     ifuncdep5 ifuncdep5pic
+extra-test-objs += $(ifunc-test-modules:=.o)
+test-extras += $(ifunc-test-modules)
 ifeq (yes,$(have-fpie))
-tests: $(objpfx)ifuncmain1pie.out $(objpfx)ifuncmain1vispie.out \
-	$(objpfx)ifuncmain1staticpie.out $(objpfx)ifuncmain5pie.out \
-	$(objpfx)ifuncmain6pie.out $(objpfx)ifuncmain7pie.out
+ifunc-pie-tests = ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \
+		  ifuncmain5pie ifuncmain6pie ifuncmain7pie
+tests: $(patsubst %,$(objpfx)%.out, $(ifunc-pie-tests))
+extra-test-objs += $(ifunc-pie-tests:=.o)
+test-extras += $(ifunc-pie-tests)
 endif
 modules-names += ifuncmod1 ifuncmod3 ifuncmod5 ifuncmod6
 endif
@@ -786,16 +796,16 @@ $(objpfx)tst-tls16.out: $(objpfx)tst-tlsmod16a.so $(objpfx)tst-tlsmod16b.so
 
 $(objpfx)tst-tls17: $(libdl)
 $(objpfx)tst-tls17.out: $(objpfx)tst-tlsmod17b.so
-$(patsubst %,$(objpfx)tst-tlsmod17a%.os,$(tlsmod17a-suffixes)): $(objpfx)tst-tlsmod17a%.os : tst-tlsmod17a.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ -DN=$* -DNOT_IN_libc=1 $<
-$(patsubst %,$(objpfx)tst-tlsmod17a%.so,$(tlsmod17a-suffixes)): $(objpfx)tst-tlsmod17a%.so: $(objpfx)ld.so
-$(objpfx)tst-tlsmod17b.so: $(patsubst %,$(objpfx)tst-tlsmod17a%.so,$(tlsmod17a-suffixes))
+$(patsubst %,$(objpfx)%.os,$(tlsmod17a-modules)): $(objpfx)tst-tlsmod17a%.os: tst-tlsmod17a.c
+	$(compile-command.c) -DN=$*
+$(patsubst %,$(objpfx)%.so,$(tlsmod17a-modules)): $(objpfx)tst-tlsmod17a%.so: $(objpfx)ld.so
+$(objpfx)tst-tlsmod17b.so: $(patsubst %,$(objpfx)%.so,$(tlsmod17a-modules))
 
 $(objpfx)tst-tls18: $(libdl)
-$(objpfx)tst-tls18.out: $(patsubst %,$(objpfx)tst-tlsmod18a%.so,$(tlsmod18a-suffixes))
-$(patsubst %,$(objpfx)tst-tlsmod18a%.os,$(tlsmod18a-suffixes)): $(objpfx)tst-tlsmod18a%.os : tst-tlsmod18a.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ -DN=$* -DNOT_IN_libc=1 $<
-$(patsubst %,$(objpfx)tst-tlsmod18a%.so,$(tlsmod18a-suffixes)): $(objpfx)tst-tlsmod18a%.so: $(objpfx)ld.so
+$(objpfx)tst-tls18.out: $(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules))
+$(patsubst %,$(objpfx)%.os,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.os : tst-tlsmod18a.c
+	$(compile-command.c) -DN=$*
+$(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.so: $(objpfx)ld.so
 
 CFLAGS-tst-align.c = $(stack-align-test-flags)
 CFLAGS-tst-align2.c = $(stack-align-test-flags)
@@ -919,16 +929,16 @@ $(objpfx)check-localplt: check-localplt.c
 ifeq (yes,$(build-shared))
 tests: $(objpfx)check-textrel.out $(objpfx)check-execstack.out
 
-$(objpfx)check-textrel.out: $(objpfx)check-textrel
-	$(dir $<)$(notdir $<) $(common-objpfx)libc.so \
-	  $(sort $(wildcard $(common-objpfx)*/lib*.so \
-			    $(common-objpfx)iconvdata/*.so)) > $@
+all-built-dso = $(common-objpfx)libc.so \
+		$(sort $(wildcard $(common-objpfx)*/lib*.so \
+				  $(common-objpfx)iconvdata/*.so))
+
+$(objpfx)check-textrel.out: $(objpfx)check-textrel $(all-built-dso)
+	$(dir $<)$(notdir $<) $(filter-out $<, $^) > $@
 generated += check-textrel check-textrel.out
 
-$(objpfx)check-execstack.out: $(objpfx)check-execstack
-	$(dir $<)$(notdir $<) $(common-objpfx)libc.so \
-	  $(sort $(wildcard $(common-objpfx)*/lib*.so \
-			    $(common-objpfx)iconvdata/*.so)) > $@
+$(objpfx)check-execstack.out: $(objpfx)check-execstack $(all-built-dso)
+	$(dir $<)$(notdir $<) $(filter-out $<, $^) > $@
 generated += check-execstack check-execstack.out
 
 $(objpfx)tst-dlmodcount: $(libdl)
diff --git a/nptl/Makefile b/nptl/Makefile
index d443305..f2a5e16 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -300,7 +300,7 @@ modules-names = tst-atfork2mod tst-tls3mod tst-tls4moda tst-tls4modb \
 		tst-tls5modd tst-tls5mode tst-tls5modf \
 		tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod
 extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o
-test-extras += $(modules-names)
+test-extras += $(modules-names) tst-cleanup4aux
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
 
 tst-atfork2mod.so-no-z-defs = yes
-- 
1.7.3.5


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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