From owner-cvs-doc@FreeBSD.ORG Sat Jul 21 11:37:07 2007 Return-Path: Delivered-To: cvs-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71A8A16A419 for ; Sat, 21 Jul 2007 11:37:07 +0000 (UTC) (envelope-from chinsan.tw@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by mx1.freebsd.org (Postfix) with ESMTP id 209E413C4B6 for ; Sat, 21 Jul 2007 11:37:07 +0000 (UTC) (envelope-from chinsan.tw@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so275101anc for ; Sat, 21 Jul 2007 04:37:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GouPX/9cD6kCE9wYAiwq02sI8ElOxYArdActH9EmOWwX2E1tpMiUJ44qYTTeP2G6bNsJS1P6VBGZuss8C/Xhzslk9mN6BMAjnZsg5eUDeBp1vzVKr1jfCKCY8nyHrUJTd4vqL691Scjs9754Ep4tcJZC5ZT3RehXS3tyqNQd1y8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Yhm20Kz3HDy5HzMbf1S4gHfhf09UR9hjOmkeWQ3NkEJshCEp9xLPAqmmKtt8m+pMjUuzq8r54f2p0qdU1C438FI8xquY3MqGkLx9qPA75P7NV+QYxxUMaKilN1WcT2BmrgaVpkf7/buGelY4fqg9fStn7BpBBmBlu6T32n9nrlw= Received: by 10.100.121.12 with SMTP id t12mr705766anc.1185017826165; Sat, 21 Jul 2007 04:37:06 -0700 (PDT) Received: by 10.100.119.4 with HTTP; Sat, 21 Jul 2007 04:37:06 -0700 (PDT) Message-ID: <1f27304c0707210437u4c6994aeg3975a8f932645400@mail.gmail.com> Date: Sat, 21 Jul 2007 19:37:06 +0800 From: chinsan To: pav@freebsd.org In-Reply-To: <1184937122.13381.34.camel@pav.hide.vol.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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> 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 X-BeenThere: cvs-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the doc and www trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 11:37:07 -0000 On 7/20/07, Pav Lucistnik 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. "