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]

Re: [PATCH] support: Introduce new subdirectory for test infrastructure


On 12/10/2016 08:39 PM, Andreas Schwab wrote:
On Dez 10 2016, Florian Weimer <fweimer@redhat.com> wrote:

Even before, not all test dependencies were properly encoded.

Which ones?

I don't remember. I assumed it was expected. I'll report it the next time I see it.

I don't want to avoid doing the work.  I just don't know what make
behavior is expected here.

If libsupport*.a changes, then all tests need to be relinked.

I came up with the attached patch to implement this. Is it what you had in mind?

Thanks,
Florian
Expose linking against libsupport as make dependency

This ensures that tests are rebuilt when libsupport changes.

2016-12-12  Florian Weimer  <fweimer@redhat.com>

	* Rules (binaries-shared-tests, binaries-pie-tests)
	(binaries-static-tests): Link with $(link-extra-libs-tests).
	* Makeconfig (+link-pie-tests, +link-static-tests, +link-tests):
	Remove $(link-extra-libs-tests).

diff --git a/Makeconfig b/Makeconfig
index be45c3a..2d316ac 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -415,8 +415,8 @@ $(+link-pie-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-pie-after-libc)
 $(call after-link,$@)
 endef
 define +link-pie-tests
-$(+link-pie-before-libc) $(link-extra-libs-tests) \
-  $(rtld-tests-LDFLAGS) $(link-libc-tests) $(+link-pie-after-libc)
+$(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
+			 $(+link-pie-after-libc)
 $(call after-link,$@)
 endef
 define +link-pie-printers-tests
@@ -442,8 +442,7 @@ $(+link-static-before-libc) $(link-libc-static) $(+link-static-after-libc)
 $(call after-link,$@)
 endef
 define +link-static-tests
-$(+link-static-before-libc) $(link-extra-libs-tests) \
-  $(link-libc-static-tests) $(+link-static-after-libc)
+$(+link-static-before-libc) $(link-libc-static-tests) $(+link-static-after-libc)
 $(call after-link,$@)
 endef
 endif
@@ -472,8 +471,8 @@ $(+link-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-after-libc)
 $(call after-link,$@)
 endef
 define +link-tests
-$(+link-before-libc) $(link-extra-libs-tests) \
-  $(rtld-tests-LDFLAGS) $(link-libc-tests) $(+link-after-libc)
+$(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
+		     $(+link-after-libc)
 $(call after-link,$@)
 endef
 define +link-printers-tests
diff --git a/Rules b/Rules
index de58a64..9e02eb7 100644
--- a/Rules
+++ b/Rules
@@ -189,6 +189,7 @@ endif
 
 ifneq "$(strip $(binaries-shared-tests))" ""
 $(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \
+  $(link-extra-libs-tests) \
   $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
 	$(+link-tests)
@@ -196,6 +197,7 @@ endif
 
 ifneq "$(strip $(binaries-pie-tests))" ""
 $(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \
+  $(link-extra-libs-tests) \
   $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
 	$(+link-pie-tests)
@@ -217,6 +219,7 @@ endif
 
 ifneq "$(strip $(binaries-static-tests))" ""
 $(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \
+  $(link-extra-libs-tests) \
   $(sort $(filter $(common-objpfx)lib%,$(link-libc-static-tests))) \
   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
 	$(+link-static-tests)

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