From owner-freebsd-stable@FreeBSD.ORG Thu Jun 15 05:05:17 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 023C016A47B for ; Thu, 15 Jun 2006 05:05:17 +0000 (UTC) (envelope-from Mark_Andrews@isc.org) Received: from farside.isc.org (farside.isc.org [204.152.187.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id C57B143D4C for ; Thu, 15 Jun 2006 05:05:16 +0000 (GMT) (envelope-from Mark_Andrews@isc.org) Received: from drugs.dv.isc.org (localhost.isc.org [IPv6:::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by farside.isc.org (Postfix) with ESMTP id 37E50E6009 for ; Thu, 15 Jun 2006 05:05:16 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (8.13.6/8.13.6) with ESMTP id k5F55CqJ054445 for ; Thu, 15 Jun 2006 15:05:13 +1000 (EST) (envelope-from marka@drugs.dv.isc.org) Message-Id: <200606150505.k5F55CqJ054445@drugs.dv.isc.org> To: stable@freebsd.org From: Mark Andrews Date: Thu, 15 Jun 2006 15:05:12 +1000 Sender: Mark_Andrews@isc.org Cc: Subject: gcc -pthread X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 05:05:17 -0000 Is there any good reason why "gcc -pthread" links in -lpthead except when -shared is specified? Also the gcc man page does not match reality. -pthread Link a user-threaded process against libc_r instead of libc. man pthread mentions these libraries but provided no discussion on if or when you should include them on the command line. Nor does it mention "-pthread". LIBRARY POSIX Threads Library (libpthread, -lpthread) 1:1 Threading Library (libthr, -lthr) Reentrant C Library (libc_r, -lc_r) The hacker handbook seems to indicate that you shouldn't need to use -lpthread or -lc_r. http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-pthread.html Mark -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews@isc.org