From jbq@anyware-tech.com  Mon Apr  3 17:29:06 2006
Return-Path: <jbq@anyware-tech.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B639F16A420
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Apr 2006 17:29:06 +0000 (UTC)
	(envelope-from jbq@anyware-tech.com)
Received: from caraldi.com (195-13-58-165.oxyd.net [195.13.58.165])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2A18A43D6B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Apr 2006 17:29:05 +0000 (GMT)
	(envelope-from jbq@anyware-tech.com)
Received: from vision.anyware (10.21.96-84.rev.gaoland.net [84.96.21.10])
	by caraldi.com (Postfix) with ESMTP id 0D3CF6114
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Apr 2006 19:29:05 +0200 (CEST)
Received: by vision.anyware (Postfix, from userid 1021)
	id 9D15B6126; Mon,  3 Apr 2006 19:29:05 +0200 (CEST)
Message-Id: <20060403172905.9D15B6126@vision.anyware>
Date: Mon,  3 Apr 2006 19:29:05 +0200 (CEST)
From: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Threading libraries in Porter's Handbook
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         95275
>Category:       docs
>Synopsis:       Threading libraries in Porter's Handbook
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 03 17:30:13 GMT 2006
>Closed-Date:    Tue Apr 04 16:53:39 GMT 2006
>Last-Modified:  Tue Apr 04 16:53:39 GMT 2006
>Originator:     Jean-Baptiste Quenot
>Release:        FreeBSD 5.5-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD vision.anyware 5.5-PRERELEASE FreeBSD 5.5-PRERELEASE #1: Thu Mar 9 19:20:53 CET 2006 jbq@vision.anyware:/usr/obj/usr/src/sys/VISION i386
>Description:
The porter's handbook must be improved because it does not state that ld does
not support -pthread, see patch below.  Thanks in advance!
>How-To-Repeat:
>Fix:
--- book.sgml.orig	Mon Apr  3 13:11:37 2006
+++ book.sgml	Mon Apr  3 13:28:39 2006
@@ -9529,6 +9529,14 @@
 	  different values, so do not just hardcode
 	  <literal>-pthread</literal> into patches and always use
 	  <makevar>PTHREAD_LIBS</makevar>.</para>
+
+  <note>
+    <para>FreeBSD may use value <literal>-pthread</literal> for
+      <makevar>PTHREAD_LIBS</makevar>, but <command>ld</command> does not
+      support this.  In this case, it may be desirable to use
+      <command>gcc</command> as linker by setting
+      <makevar>CONFIGURE_ENV</makevar> to <literal>LD=${CC}</literal>.</para>
+  </note>
       </sect1>
 
       <sect1 id="dads-freedback">
>Release-Note:
>Audit-Trail:

From: Pav Lucistnik <pav@FreeBSD.org>
To: bug-followup@FreeBSD.org, jb.quenot@caraldi.com
Cc:  
Subject: Re: docs/95275: Threading libraries in Porter's Handbook
Date: Mon, 03 Apr 2006 23:35:12 +0200

 How many ports need this? I never seen this problem.
 I'd prefer not to add this to PH, if it's of minor impact.
 I can imagine people copy-pasting it blindly into ports that don't need
 it.
 
 -- 
 Pav Lucistnik <pav@oook.cz>
               <pav@FreeBSD.org>
 
 Time flies like an arrow. Fruit flies like a banana.

From: Jean-Baptiste Quenot <jbq@caraldi.com>
To: Pav Lucistnik <pav@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/95275: Threading libraries in Porter's Handbook
Date: Tue, 4 Apr 2006 10:06:41 +0200

 * Pav Lucistnik:
 
 > How  many ports  need this?   I  never seen  this problem.   I'd
 > prefer not to add this to PH, if it's of minor impact.
 
 All  ports that  need linking  with threading  libraries and  that
 use  ld(1) for  linking.   This problem  arose  on www/resin2  and
 www/resin3,  I don't  really understand  why other  ports are  not
 affected.  But if  you look at the man page  ld(1) you will notice
 that indeed -pthread is not an available option.
 -- 
      Jean-Baptiste Quenot
 aka  John Banana Qwerty
 http://caraldi.com/jbq/

From: Pav Lucistnik <pav@FreeBSD.org>
To: Jean-Baptiste Quenot <jbq@caraldi.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/95275: Threading libraries in Porter's Handbook
Date: Tue, 04 Apr 2006 17:34:37 +0200

 Jean-Baptiste Quenot p=ED=B9e v =FAt 04. 04. 2006 v 10:06 +0200:
 > * Pav Lucistnik:
 >=20
 > > How  many ports  need this?   I  never seen  this problem.   I'd
 > > prefer not to add this to PH, if it's of minor impact.
 >=20
 > All  ports that  need linking  with threading  libraries and  that
 > use  ld(1) for  linking.   This problem  arose  on www/resin2  and
 > www/resin3,  I don't  really understand  why other  ports are  not
 > affected.  But if  you look at the man page  ld(1) you will notice
 > that indeed -pthread is not an available option.
 
 If this only affects two ports, may I ask you to rephrase the entry to
 say something like
 
 If case the ld errors out with message about not undestanding -pthread,
 you may want to use gcc as...
 
 --=20
 Pav Lucistnik <pav@oook.cz>
               <pav@FreeBSD.org>
 
 A)bort, R)etry, H)it with big hammer

From: Jean-Baptiste Quenot <jbq@caraldi.com>
To: Pav Lucistnik <pav@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/95275: Threading libraries in Porter's Handbook
Date: Tue, 4 Apr 2006 17:57:37 +0200

 --tNQTSEo8WG/FKZ8E
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Right, please find attached the updated patch.
 -- 
      Jean-Baptiste Quenot
 aka  John Banana Qwerty
 http://caraldi.com/jbq/
 
 --tNQTSEo8WG/FKZ8E
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="20060403-freebsd-porter-handbook-pthread.txt"
 
 --- book.sgml.orig	Mon Apr  3 13:11:37 2006
 +++ book.sgml	Tue Apr  4 17:57:02 2006
 @@ -9529,6 +9529,15 @@
  	  different values, so do not just hardcode
  	  <literal>-pthread</literal> into patches and always use
  	  <makevar>PTHREAD_LIBS</makevar>.</para>
 +
 +  <note>
 +    <para>If building the port errors out with <literal>unrecognized option
 +        '-pthread'</literal> when setting <makevar>PTHREAD_LIBS</makevar>, it
 +      may be desirable to use <command>gcc</command> as linker by setting
 +      <makevar>CONFIGURE_ENV</makevar> to <literal>LD=${CC}</literal>.  Indeed
 +      the <literal>-pthread</literal> option is not supported by
 +      <command>ld</command>.</para>
 +  </note>
        </sect1>
  
        <sect1 id="dads-freedback">
 
 --tNQTSEo8WG/FKZ8E--
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Apr 4 16:53:31 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=95275 
>Unformatted:
