cvs commit: doc/en_US.ISO8859-1/books/porters-handbook book.sgml

Pav Lucistnik pav at FreeBSD.org
Sat Jul 21 13:11:19 UTC 2007


chinsan píše v so 21. 07. 2007 v 19:37 +0800:
> On 7/20/07, Pav Lucistnik <pav at freebsd.org> wrote:
> > chinsan píše v pá 20. 07. 2007 v 21:06 +0800:
> 
> > > Since "PTHREAD_LIBS?= -pthread", so why we should replace it again?
> > > Therefore, it was guessed as a typo of "-lpthread" instead of "-pthread".
> > > Because PTHREAD_LIBS = -pthread. :)
> > >
> >
> > People are supposed to patch s|-pthread|${PTHREAD_LIBS}| too, because
> > PTHREAD_LIBS are not guaranteed to be equal to -pthread forever.
> >
> 
> 
> So...according to what you means,
> we should update the "12.12 Threading libraries" section....?

This chapter you quoted is 100% correct as it is.

You basically went on and gratuitously changed a REINPLACE_CMD example.
The old example was just fine.

> "12.12 Threading libraries
> 
> The threading library must be linked to the binaries using a special
> linker flag -pthread on FreeBSD. If a port insists on linking
> -lpthread or -lc_r 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 FreeBSD versions it can
> have different values, so do not just hardcode -pthread into patches
> and always use PTHREAD_LIBS.
> 
>     Note: If building the port errors out with unrecognized option
> '-pthread' when setting PTHREAD_LIBS, it may be desirable to use gcc
> as linker by setting CONFIGURE_ENV to LD=${CC}. The -pthread option is
> not supported by ld directly.
> "
> 
-- 
Pav Lucistnik <pav at oook.cz>
              <pav at FreeBSD.org>

But soft, what light through yonder window breaks? It is the East,
and Juliet is the sun! Arise, fair sun, and kill the envious moon,
who is already sick and pale with grief that thou her maid art far
more fair than she.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
	=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
	=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.freebsd.org/pipermail/cvs-doc/attachments/20070721/818bcd8e/attachment.pgp


More information about the cvs-doc mailing list