[PATCH] Fix test-suite failure with -Wl,--as-needed
Allan McRae
allan@archlinux.org
Mon Oct 8 03:52:00 GMT 2012
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
More information about the Libc-alpha
mailing list