fb633e
diff -Nrup a/nptl/Makefile b/nptl/Makefile
fb633e
--- a/nptl/Makefile	2012-06-05 07:42:49.000000000 -0600
fb633e
+++ b/nptl/Makefile	2012-06-07 12:15:21.816318678 -0600
fb633e
@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \
fb633e
     $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
fb633e
 				       $(objpfx)libpthread_nonshared.a
Siddhesh Poyarekar 8710f4
 $(objpfx)tst-unload: $(libdl)
fb633e
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
fb633e
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
fb633e
 # since otherwise libpthread.so comes before libc.so when linking.
fb633e
 $(addprefix $(objpfx), $(tests-reverse)): \
fb633e
-  $(objpfx)../libc.so $(objpfx)libpthread.so \
fb633e
+  $(objpfx)linklibc.so $(objpfx)libpthread.so \
fb633e
   $(objpfx)libpthread_nonshared.a
fb633e
 $(objpfx)../libc.so: $(common-objpfx)libc.so ;
fb633e
 $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
fb633e
 
fb633e
 $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
fb633e
+
fb633e
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
fb633e
+	ln -s ../libc.so $@
fb633e
+generated += libclink.so
fb633e
 else
fb633e
 $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
fb633e
 endif