- Add a Dos'n'Donts chapter on fixing pthread libraries

This commit is contained in:
Pav Lucistnik 2006-01-08 17:32:10 +00:00
parent 8f08732f73
commit 1c6ce94470
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=26807

View file

@ -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>