Index: book.xml =================================================================== --- book.xml (revision 40964) +++ book.xml (working copy) @@ -787,8 +787,7 @@ variable value. Example: post-patch: - @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README - @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README Quite often, there is a situation when the software being ported, especially if it is primarily developed on &windows;, @@ -16172,25 +16171,18 @@ Threading Libraries The threading library must be linked to the binaries using - a special linker flag -pthread on &os;. If + a special flag -pthread on &os;. If a port insists on linking -lpthread - directly, patch it to use - PTHREAD_LIBS variable provided by the ports - framework. This variable usually has the value of - -pthread, but on certain architectures and - &os; versions it can have different values, so do not just - hardcode -pthread into patches and always - use PTHREAD_LIBS. + directly, patch it to use -pthread. If building the port errors out with - unrecognized option '-pthread' when - setting PTHREAD_LIBS, it may be desirable - to use cc as linker by setting - CONFIGURE_ENV to - LD=${CC}. The - -pthread option is not supported by - ld directly. + unrecognized option '-pthread', + it may be desirable to use cc as linker by + setting CONFIGURE_ENV to + LD=${CC}. The + -pthread option is not supported by + ld directly.