From owner-freebsd-current@FreeBSD.ORG Sun Sep 21 21:17:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9064D16A4B3; Sun, 21 Sep 2003 21:17:45 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1B0B43FCB; Sun, 21 Sep 2003 21:17:43 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id h8M4HhgG026053; Mon, 22 Sep 2003 00:17:43 -0400 (EDT) Date: Mon, 22 Sep 2003 00:17:43 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: deischen@freebsd.org In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: Fixing -pthreads (Re: ports and -current) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 04:17:45 -0000 On Sun, 21 Sep 2003, Daniel Eischen wrote: > On Mon, 22 Sep 2003, Dan Naumov wrote: > > > On Mon, 2003-09-22 at 00:42, Daniel Eischen wrote: > > > We've already been over this before. The problem is not > > > as bad as you think, and there are other platforms that > > > don't have -pthread. > > > > And those platforms would be? > > Solaris for one: > > bash-2.05$ uname -a > SunOS pcnet5 5.8 Generic_108528-12 sun4u sparc SUNW,Ultra-2 > bash-2.05$ type cc > cc is hashed (/usr/ucb/cc) > bash-2.05$ type gcc > gcc is hashed (/usr/local/bin/gcc) > bash-2.05$ cc -pthread > cc: unrecognized option `-pthread' > cc: No input files > bash-2.05$ gcc -pthread > gcc: unrecognized option `-pthread' > gcc: No input files > > gcc does have -pthreads and -threads for Solaris, but these are > basically NOOPs (just what we are doing). They define > -D_REENTRANT -D_PTHREADS for -pthreads and -D_REENTRANT > and -D_SOLARIS_THREADS for -threads. These do not specify > any libraries to link, just predefines. FreeBSD doesn't > have anything to predefine, so it is a true NOOP. Actually, it does look like the Solaris -threads and -pthreads options do imply linking to -lthread and -lpthread respectively (when not building with -shared). But regardless, -threads and -pthreads are not portable. -- Dan Eischen