From owner-freebsd-threads@FreeBSD.ORG Mon May 8 18:16:35 2006 Return-Path: X-Original-To: freebsd-threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5CE216A400 for ; Mon, 8 May 2006 18:16:35 +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 9D4EE43D45 for ; Mon, 8 May 2006 18:16:35 +0000 (GMT) (envelope-from mark@noc.mainstreet.net) Received: from localhost (localhost [127.0.0.1]) by noc.mainstreet.net (Postfix) with ESMTP id 7AC5528549 for ; Mon, 8 May 2006 11:16:35 -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 40714-02 for ; Mon, 8 May 2006 11:16:34 -0700 (PDT) Received: by noc.mainstreet.net (Postfix, from userid 1002) id CCAA228548; Mon, 8 May 2006 11:16:34 -0700 (PDT) From: Mark Kent To: freebsd-threads@FreeBSD.org Message-Id: <20060508181634.CCAA228548@noc.mainstreet.net> Date: Mon, 8 May 2006 11:16:34 -0700 (PDT) Cc: Subject: different behaviour with different libs X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2006 18:16:35 -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