Date: Fri, 29 Aug 2003 01:28:19 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: "=?iso-8859-1?q?Pedro=20F.=20Giffuni?=" <giffunip@yahoo.com> Cc: freebsd-threads@FreeBSD.org Subject: Re: Removing -pthread from gcc Message-ID: <Pine.GSO.4.10.10308290114540.10807-100000@pcnet5.pcnet.com> In-Reply-To: <20030829042613.80458.qmail@web13406.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Aug 2003, [iso-8859-1] Pedro F. Giffuni wrote: > Hi guys; > > First of all congratulations to all the people involved in the new thread > support! > > I'm not understanding what the new world order will be, but please try to agree > something with the autoconf people: from my porting experience, autoconf is not > interested on what PTHREAD_LIBS says; it just tries to link with pthread and if > that fails it assumes the platform doesn't support threads at all. -pthread is currently a compiler switch, and we (FreeBSD) are one of the very few OSes that have such an option. It was only there to prevent linking to libc in FreeBSD-[34]; otherwise it would not exist. Do not confuse -pthread with -lpthread or -lthr/-lkse/-llinuxthreads/-lwhatever. If autoconf has been taught that FreeBSD has -pthread, then it will have to be untaught. Eliminating -pthread will expose those ports that use it and then they can be fixed. If left in and we try to link with libpthread,libkse,libthr, etc, we will end up with ports that link to one of those libraries _and_ libc_r. Just try copying libkse or libthr to libpthread _without_ changing PTHREAD_LIBS (so you still use libc_r) and rebuilding X or KDE. Those ports will end up detecting libpthread and linking to it, and they will still also link to libc_r. This will not work but you won't know it until you try running the port and wacky weirdness ensues. -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10308290114540.10807-100000>