Hello,

Aurelien Jarno, le Thu 03 Jan 2008 07:38:02 +0100, a écrit :
> >>> I was wondering: since we had to set _dl_dynamic_weak to 1; in
> >>> order to get the X11 stubs working properly anyway, maybe we could add
> >>> to the debian glibc package a temporary patch that implements the few
> >>> stubs, instead of erroneously asking packages to add -lpthread?
> 
> You can make the patch Hurd specific by using the series.hurd-i386
> patch. This way you are sure it won't break other architectures.

Well, I've just put a forward.c in hurd/, so no problem for that:)

However, I've got problems with symbol versions.  According to the
ld documentation and experiments there seems to be no way to have
these stubs version-less because libc already uses versions.  That
means that adding these hooks in libc.so would make references to
these stubs versioned (say GLIBC_2.2.3).  That's not a problem for now
since hurd's libpthread doesn't use versioning and so it would take
precedence.  However, when libpthread eventually gets integrated in
glibc (say in version 2.9)[1], the real function would officially get
a version, GLIBC_2.9.  And then the old libraries which still have a
GLIBC_2.2.3-versioned reference to the stubs won't accept the GLIBC_2.9
version, unless it is explicitely said in glibc's version script that
these functions are fine as GLIBC_2.2.3 versions too, but of course
upstream wouldn't do that (why 2.2.3 ?).  That would mean that debian
has to carry a patch against the version script until all libraries
using stubs get recompiled with a glibc with the integrated libpthread
and thus get the correctly versioned reference.

Another solution would be to produce a libpthread_stubs.so library
(automatically linked-in as-needed from the libc.so script) which
provides version-less symbols and hence produce version-less references,
but that would mean that this library needs to be kept until all
threaded libraries are recompiled with a glibc with the integrated
libpthread, since then libpthread_stubs.so would be marked as NEEDED.

A last solution would be to produce a libpthread_stubs.a library
(automatically linked-in as-needed too) which directly provides the
stubs.  That's the libX11 approach which made us have to define
_dl_dynamic_weak to 1.  That would mean that we have to keep
_dl_dynamic_weak to 1 until all libraries using threads get recompiled
with a glibc with the integrated libpthread, since all these libraries
will behave like our current libX11.

/me desperate to find a less mid-term bloating solution...

Samuel
[1] or, if not integrated in glibc, when libpthread starts using its own
versions.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to