From owner-freebsd-current@FreeBSD.ORG Wed Sep 24 16:07:49 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 91B1016A4B3; Wed, 24 Sep 2003 16:07:49 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0FCE44015; Wed, 24 Sep 2003 16:07:48 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) Received: from localhost (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8ON7kFY078110; Wed, 24 Sep 2003 16:07:47 -0700 (PDT) (envelope-from davidxu@FreeBSD.org) From: David Xu To: deischen@FreeBSD.org, Daniel Eischen , John Baldwin Date: Thu, 25 Sep 2003 07:10:41 +0800 User-Agent: KMail/1.5.3 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309250710.41607.davidxu@FreeBSD.org> cc: 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: davidxu@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: Wed, 24 Sep 2003 23:07:49 -0000 On Wednesday 24 September 2003 23:11, Daniel Eischen wrote: > On Wed, 24 Sep 2003, John Baldwin wrote: > > On 23-Sep-2003 Dan Naumov wrote: > > > On Tue, 2003-09-23 at 23:25, Dan Naumov wrote: > > >> On Tue, 2003-09-23 at 23:13, Daniel Eischen wrote: > > >> > I understand that folks want to wave their hands and say "just make > > >> > -pthread work and do whatever it needs to". > > >> > > >> I am one of those folks as well. As an end-user, I am not interested > > >> in hacking around the source of 3rd-party applications that use > > >> -pthread when compiling them from source myself. Not in the slightest. > > >> This is BAD BAD BAD for usability. > > >> > > >> Sincerely, > > >> Dan Naumov > > > > > > I also believe that a question has to be asked, what do the -core and > > > -arch people think of all this ? I think that they should have the > > > final say in the matter. > > > > I think having a magic option to gcc that translates to 'link with the > > foo library' is rediculous. What's next, a gcc -math to get the math > > functions in libm? The fact that functions live in libraries and that > > to get access to said functions you link with said libraries has been > > the practice on Un*x for longer than I've been alive. Please, people, > > let the -pthread hack die and just use -l. > > I think any FreeBSD-specific -pthread bits should just be removed > > and have the compiler complain about a bogus option. If gcc chooses > > to have a machine independent -pthread (or -thread) to turn on TLS or > > some such, that's great and all, but that would be gcc code, not > > FreeBSD-specific code. > > Where were you a few days ago! I definitly agree with Dan, -pthread is too ugly, it really really is nothing to do with compiler and should be removed. If someone thinks -pthread should be kept, then think about Microsoft, you are doing Microsoft way and cause lots of trouble when I am programmming on Windows, Microsoft has two version of c library, threaded library and non-threaded library, it need a compiler flag -MT to link a thread library, then lots of library conflict with this flag at linking time because some were compiled with -MT some were not, this is rather annoying. This is a bit OT, but I hope we can avoid such decision bug. Many software use autoconf, autconf prefers -lpthread than -pthread, it even prefers -lc_r then -pthread (if I remembered it right ). if system has a libpthread there, it will generate Makefile to use -lpthread not -pthread, obviously -pthread is not suggested to use. One word, just let -pthread die. David Xu