This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix test-suite failure with -Wl,--as-needed
- From: Allan McRae <allan at archlinux dot org>
- To: libc-alpha at sourceware dot org
- Date: Mon, 8 Oct 2012 13:51:47 +1000
- Subject: [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