Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2007 19:37:06 +0800
From:      chinsan <chinsan.tw@gmail.com>
To:        pav@freebsd.org
Cc:        doc-committers@freebsd.org, cvs-doc@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: doc/en_US.ISO8859-1/books/porters-handbook book.sgml
Message-ID:  <1f27304c0707210437u4c6994aeg3975a8f932645400@mail.gmail.com>
In-Reply-To: <1184937122.13381.34.camel@pav.hide.vol.cz>
References:  <200707201246.l6KCkC8M062760@repoman.freebsd.org> <1184936122.13381.28.camel@pav.hide.vol.cz> <1f27304c0707200606s32541002g488f2f1a92ff8f21@mail.gmail.com> <1184937122.13381.34.camel@pav.hide.vol.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/20/07, Pav Lucistnik <pav@freebsd.org> wrote:
> chinsan p=ED=9Ae v p=E1 20. 07. 2007 v 21:06 +0800:

> > Since "PTHREAD_LIBS?=3D -pthread", so why we should replace it again?
> > Therefore, it was guessed as a typo of "-lpthread" instead of "-pthread=
".
> > Because PTHREAD_LIBS =3D -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....?

"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=3D${CC}. The -pthread option is
not supported by ld directly.
"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1f27304c0707210437u4c6994aeg3975a8f932645400>