From owner-freebsd-arch@FreeBSD.ORG Fri Apr 22 23:16:29 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBFB416A4CE; Fri, 22 Apr 2005 23:16:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE37643D2D; Fri, 22 Apr 2005 23:16:29 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j3MNGRQZ092815; Fri, 22 Apr 2005 23:16:28 GMT (envelope-from davidxu@freebsd.org) Message-ID: <426985CA.30003@freebsd.org> Date: Sat, 23 Apr 2005 07:16:26 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050306 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: sgk@troutmask.apl.washington.edu cc: peter@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: libpthread version bump X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 23:16:29 -0000 Daniel Eischen wrote: >On Fri, 22 Apr 2005, Daniel Eischen wrote: > > > >>On Fri, 22 Apr 2005, Peter Wemm wrote: >> >> >> >>>#2 can also make it a little easier to run 5.x i386 binaries on amd64 - >>>we could kill of most of those nasty ifdefs. >>> >>>#1 would end up something like: >>> #pragma weak i386_set_gsbase >>> #pragma weak i386_get_gsbase >>> static void (*have_get_gsbase)(void) = i386_get_gsbase; >>> static void (*have_set_gsbase)(void *) = i386_set_gsbase; >>> if (have_i386_get_gsbase == NULL || have_get_gsbase() == -1) { >>> use_ldt(); >>> } else { >>> use_gsbase(); >>> } >>>I think that is sufficient to test if the symbols are present and test >>>if they work at runtime... >>> >>> >>I worked up a quick patch. It compiles, but it will be some time >>before I can try it. >> >> http://people.freebsd.org/~deischen/kse/libpthread.diffs >> >> > >Note that I also slightly prefer #2, since you would have to make >the #pragma weak hacks to both libpthread and libthr. > > > I won't support LDT based TLS, so you don't have to patch it. David Xu