- Add a Dos'n'Donts chapter on fixing pthread libraries
This commit is contained in:
parent
8f08732f73
commit
1c6ce94470
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=26807
1 changed files with 16 additions and 0 deletions
|
@ -9398,6 +9398,22 @@ bacula:*:910:</programlisting>
|
|||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="dads-pthread">
|
||||
<title>Threading libraries</title>
|
||||
|
||||
<para>The threading library must be linked to the binaries
|
||||
using a special linker flag <literal>-pthread</literal> on
|
||||
&os;. If a port insists on linking
|
||||
<literal>-lpthread</literal> or <literal>-lc_r</literal>
|
||||
directly, patch it to use <makevar>PTHREAD_LIBS</makevar>
|
||||
variable provided by the ports framework. This variable
|
||||
usually has the value of <literal>-pthread</literal>, but
|
||||
on certain architectures and &os; versions it can have
|
||||
different values, so do not just hardcode
|
||||
<literal>-pthread</literal> into patches and always use
|
||||
<makevar>PTHREAD_LIBS</makevar>.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="dads-freedback">
|
||||
<title>Feedback</title>
|
||||
|
||||
|
|
Loading…
Reference in a new issue