From owner-freebsd-questions@FreeBSD.ORG Tue May 9 21:32:54 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F6E316A560 for ; Tue, 9 May 2006 21:32:54 +0000 (UTC) (envelope-from mark@noc.mainstreet.net) Received: from noc.mainstreet.net (noc.mainstreet.net [207.5.0.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F67543D48 for ; Tue, 9 May 2006 21:32:54 +0000 (GMT) (envelope-from mark@noc.mainstreet.net) Received: from localhost (localhost [127.0.0.1]) by noc.mainstreet.net (Postfix) with ESMTP id E97E928458 for ; Tue, 9 May 2006 14:32:53 -0700 (PDT) Received: from noc.mainstreet.net ([127.0.0.1]) by localhost (noc.mainstreet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 44314-19 for ; Tue, 9 May 2006 14:32:53 -0700 (PDT) Received: by noc.mainstreet.net (Postfix, from userid 1002) id 3F23128456; Tue, 9 May 2006 14:32:53 -0700 (PDT) From: Mark Kent To: freebsd-questions@freebsd.org Message-Id: <20060509213253.3F23128456@noc.mainstreet.net> Date: Tue, 9 May 2006 14:32:53 -0700 (PDT) Subject: threads in 5.4 and 5.5 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2006 21:32:54 -0000 Hello, What is the canonical way to compile programs that use posix threads on freebsd 5.4+, with gcc? I've seen comments that say that -pthread, used in 4.x, should go away for 5.x. But, for example, /usr/ports/security/openssl uses -pthread. So, use it? Don't use it? Should I care? And what does it mean when a program works with one thread library and not another? I've got a case like this: libpthread.so.1: chew up cpu, then SEGV libthr.so.1: chew up cpu, but works! libc_r.so.5: works great! This is changed with libmap.conf. Does this point to any particular shady coding practice? Once I know that libc_r is my friend, does this suggest a certain set of compile flags and/or link flags? Thanks, -mark