From owner-freebsd-ports Mon Jan 22 19: 6:46 2001 Delivered-To: freebsd-ports@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id E4DC237B401 for ; Mon, 22 Jan 2001 19:06:28 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id WAA16963; Mon, 22 Jan 2001 22:06:00 -0500 (EST) Date: Mon, 22 Jan 2001 22:05:59 -0500 (EST) From: Daniel Eischen To: "Carlos A. M. dos Santos" Cc: ports@FreeBSD.ORG Subject: Re: HEADS UP: -pthread is going to break under -current soon In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 23 Jan 2001, Carlos A. M. dos Santos wrote: > On Mon, 22 Jan 2001, Daniel Eischen wrote: > > > In a couple of days, I'll be committing changes to libc and libc_r > > to allow them to be linked together via -lc_r. libc_r will only > > contain the thread functions and will not contain any libc functions > > as it does currently. > > At last! This was something I was waiting for since I started to tweak > with threaded X applications in FreeBSD. > > > We currently use -pthread as a non-standard hack to link to libc_r > > and to prevent linking to libc. After I commit these changes, using > > -pthread will not work; it will produce an executable that is only > > linked to libc_r but which also needs to be linked to libc. This also > > means that all (shared) threaded apps will need to be recompiled under > > -current. > > Please add weak stubs of pthread_*() in libc.so and use the name > libpthread instead of libc_r (that is the name that everyone, e.g. > autoconf, looks for) as made in Solaris (and OpenBSD, I believe). This is > the reasonable thing to do and will finally end with the messy libXThrStub > that is used currently to enable threads support in X. I am reserving libpthread for development of the new threads library based on KSEs (schedular activations). Search -arch for more info on that if you are interested. libc will have pthread_* stubs. If you want, you could even make links from libpthread.{a,so} to libc_r.{a,so.5} and link with -lpthread. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message