<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">> lovely, it is a debian change for hurd :-(<br>
> <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61841" rel="noreferrer" target="_blank">
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61841</a><br>
<br>
Thanks for finding that. It seems that the behaviour that seems strange to me is exactly what they were aiming for. I suppose it can be argued that including <thread> without the intention to spawn a thread is strange too.<br>
<br>
> I wonder if we should just refuse to build lld if LLVM_ENABLE_THREADS is off.<br>
<br>
Personally, I have no objections to that but it does prevent using this option as a way to rule out threading issues when debugging.<br>
<br>
I should mention that this patch was originally to fix LLVM_ENABLE_THREADS=ON builds. I only tried OFF to test the other cases and found I still needed the 'find_package(Threads)' to get a successful link.<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF898656"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Rui Ueyama [ruiu@google.com]<br>
<b>Sent:</b> 05 November 2015 09:04<br>
<b>To:</b> Rafael Espíndola<br>
<b>Cc:</b> Daniel Sanders; llvm-commits; reviews+D14165+public+8a648fa84ee244b3@reviews.llvm.org<br>
<b>Subject:</b> Re: [PATCH] D14165: [lld] Ensure we link to the threading library used by std::thread (e.g. pthreads).<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Thu, Nov 5, 2015 at 6:11 AM, Rafael Espíndola <span dir="ltr">
<<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
lovely, it is a debian change for hurd :-(<br>
<br>
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61841" rel="noreferrer" target="_blank">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61841</a><br>
<br>
I wonder if we should just refuse to build lld if LLVM_ENABLE_THREADS is off.<br>
</blockquote>
<div><br>
</div>
<div>Who wants to use LLVM without threading support and why? (I just don't know about that, and I'm trying to make an informed decision.)</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
<div class="HOEnZb">
<div class="h5"><br>
<br>
On 5 November 2015 at 08:57, Daniel Sanders <<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>> wrote:<br>
> Sure, see attached.<br>
> ________________________________<br>
> From: Rafael Espíndola [<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>]<br>
> Sent: 05 November 2015 04:16<br>
> To: Daniel Sanders<br>
> Cc: llvm-commits; Rui Ueyama;<br>
> <a href="mailto:reviews%2BD14165%2Bpublic%2B8a648fa84ee244b3@reviews.llvm.org" target="_blank">
reviews+D14165+public+8a648fa84ee244b3@reviews.llvm.org</a><br>
> Subject: RE: [PATCH] D14165: [lld] Ensure we link to the threading library<br>
> used by std::thread (e.g. pthreads).<br>
><br>
> Can you email the .ii file?<br>
><br>
> On Nov 5, 2015 4:54 AM, "Daniel Sanders" <<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>> wrote:<br>
>><br>
>> It's the libstdc++-4.9-dev in Debian Jessie (amd64). The package version<br>
>> is 4.9.2-10.<br>
>> ________________________________________<br>
>> From: Rafael Espíndola [<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>]<br>
>> Sent: 04 November 2015 13:02<br>
>> To: <a href="mailto:reviews%2BD14165%2Bpublic%2B8a648fa84ee244b3@reviews.llvm.org" target="_blank">
reviews+D14165+public+8a648fa84ee244b3@reviews.llvm.org</a>; Daniel<br>
>> Sanders<br>
>> Cc: Rui Ueyama; llvm-commits<br>
>> Subject: Re: [PATCH] D14165: [lld] Ensure we link to the threading library<br>
>> used by std::thread (e.g. pthreads).<br>
>><br>
>> Which C++ library is that? On my system (gcc 4.9) running<br>
>><br>
>> grep -r '&pthread_create' /usr/include/c++/<br>
>><br>
>> finds nothing.<br>
>><br>
>> And in the preprocessed file:<br>
>><br>
>> $ grep pthread_create  SymbolTable.ii<br>
>> extern int pthread_create (pthread_t *__restrict __newthread,<br>
>> static __typeof(pthread_create) __gthrw_pthread_create __attribute__<br>
>> ((__weakref__("pthread_create")));<br>
>>   return __gthrw_pthread_create (__threadid, __null, __func, __args);<br>
>><br>
>><br>
>> Cheers,<br>
>> Rafael<br>
>><br>
>> On 30 October 2015 at 03:28, Daniel Sanders via llvm-commits<br>
>> <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> > dsanders added a comment.<br>
>> ><br>
>> > FWIW, it seems odd that we'd need pthreads when we don't use threads.<br>
>> > I've just had a look at the preprocessed source for COFF/SymbolTable.cpp and<br>
>> > the pthread_create reference comes from this line:<br>
>> ><br>
>> >   __asm ("" : : "r" (&pthread_create));<br>
>> ><br>
>> > which was in the <thread> that was included by <future>.<br>
>> ><br>
>> ><br>
>> > <a href="http://reviews.llvm.org/D14165" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14165</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > llvm-commits mailing list<br>
>> > <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>