From owner-freebsd-current Tue Apr 13 15:55:28 1999 Delivered-To: freebsd-current@freebsd.org Received: from psf.Pinyon.ORG (ip-83-001.prc.primenet.com [207.218.83.1]) by hub.freebsd.org (Postfix) with ESMTP id 4601614CBE for ; Tue, 13 Apr 1999 15:55:22 -0700 (PDT) (envelope-from rcarter@psf.Pinyon.ORG) Received: from psf.Pinyon.ORG (localhost [127.0.0.1]) by psf.Pinyon.ORG (8.9.3/8.9.2) with ESMTP id PAA38373 for ; Tue, 13 Apr 1999 15:49:36 -0700 (MST) (envelope-from rcarter@psf.Pinyon.ORG) Message-Id: <199904132249.PAA38373@psf.Pinyon.ORG> X-Mailer: exmh version 2.0.3 To: freebsd-current@freebsd.org Subject: Re: compiler specs for -pthread/-kthread In-Reply-To: Your message of "Tue, 13 Apr 1999 17:45:07 EST." <19990413174507.A440@tar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 Apr 1999 15:49:35 -0700 From: "Russell L. Carter" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG %On Tue, Apr 13, 1999 at 03:16:01PM -0700, Kurt D. Zeilenga wrote: %> To facilate auto detection of the local threading environment, %> it would be nice if the -?thread options set all the necessary %> compiler/linker flags. It is a common practace for such %> options to specify both compilation and link options. %> %> I suggest the EGCS specs be adjusted to: %> %> -pthread => -D_THREAD_SAFE -D_UTHREADS -lc_r %> -kthread => -D_THREAD_SAFE -D_KTHREADS -lpthread % %A little known and not well documented fact is that FreeBSD also %uses _REENTRANT in its header files. Ever wondered why you %couldn't find declarations for gamma_r, lgamma_r, gammaf_r, %or lgammaf_r? Check math.h. :) % %Personally I think conditional declarations should just be %eliminated from math.h, rather than tell people they might %have to add -D_REENTRANT. :) % %> %> If the LinuxThread "port" is targetted to be -kthread: %> %> -kthread => -D_REENRANT -D_LINUXTHREADS -lpthread and don't forget -lgcc_r... Russell [...] %-- %Richard Seaman, Jr. email: dick@tar.com %5182 N. Maple Lane phone: 414-367-5450 %Chenequa WI 53058 fax: 414-367-5852 % % %To Unsubscribe: send mail to majordomo@FreeBSD.org %with "unsubscribe freebsd-current" in the body of the message % To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message