Date: Fri, 22 Apr 2005 17:26:36 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Peter Wemm <peter@wemm.org> Cc: freebsd-arch@freebsd.org Subject: Re: libpthread version bump Message-ID: <Pine.GSO.4.43.0504221722430.24214-100000@sea.ntplx.net> In-Reply-To: <Pine.GSO.4.43.0504221701470.24214-100000@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
--
DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0504221722430.24214-100000>
