[PATCH] D14165: [lld] Ensure we link to the threading library used by std::thread (e.g. pthreads).
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 4 13:02:32 PST 2015
Which C++ library is that? On my system (gcc 4.9) running
grep -r '&pthread_create' /usr/include/c++/
finds nothing.
And in the preprocessed file:
$ grep pthread_create SymbolTable.ii
extern int pthread_create (pthread_t *__restrict __newthread,
static __typeof(pthread_create) __gthrw_pthread_create __attribute__
((__weakref__("pthread_create")));
return __gthrw_pthread_create (__threadid, __null, __func, __args);
Cheers,
Rafael
On 30 October 2015 at 03:28, Daniel Sanders via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> dsanders added a comment.
>
> FWIW, it seems odd that we'd need pthreads when we don't use threads. I've just had a look at the preprocessed source for COFF/SymbolTable.cpp and the pthread_create reference comes from this line:
>
> __asm ("" : : "r" (&pthread_create));
>
> which was in the <thread> that was included by <future>.
>
>
> http://reviews.llvm.org/D14165
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list