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 test-suite failure with -Wl,--as-needed


When building the test-suite with --as-needed in your LDFLAGS, the
test test-cond24 fails linking:

/build/nptl/tst-cond24.o: In function `thread_fun_timed':
tst-cond24.c:(.text+0x30c): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status


nptl/ChangeLog:

2012-10-08	Allan McRae	<allan@archlinux.org>

	*Makefile (LDFLAGS-tst-cond24): Use $(no-as-needed).

---
 nptl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nptl/Makefile b/nptl/Makefile
index 67c2627..a89619d 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -275,7 +275,7 @@ gen-as-const-headers = pthread-errnos.sym
 
 LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
 
-LDFLAGS-tst-cond24 = -lrt
+LDFLAGS-tst-cond24 = $(no-as-needed) -lrt
 
 include ../Makeconfig
 
-- 
1.7.12.2


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