__vdso_clock_gettime is in libc/sysdeps/unix/sysv/linux/x86_64/init-first.c and is only defined for SHARED, so we cannot use it when !SHARED. otherwise, static linking against pthread_cond_timedwait() libpthread.a fails. http://bugs.gentoo.org/198949 Patch by Michal Januszewski. --- libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S @@ -134,12 +134,14 @@ __pthread_cond_timedwait: /* Only clocks 0 and 1 are allowed so far. Both are handled in the kernel. */ leaq 24(%rsp), %rsi +# ifdef SHARED movq __vdso_clock_gettime@GOTPCREL(%rip), %rax movq (%rax), %rax PTR_DEMANGLE (%rax) jz 26f call *%rax jmp 27f +# endif 26: movl $__NR_clock_gettime, %eax syscall 27: