[PATCH] libc x86-64 __thread fix

Jakub Jelinek jakub@redhat.com
Mon Oct 14 16:13:00 GMT 2002


On Mon, Oct 14, 2002 at 12:37:59PM -0700, Roland McGrath wrote:
> Something is wrong if you need that.  USE___THREAD != HAVE___THREAD.
> Why is USE___THREAD defined in your rtld build?

Actually, maybe just the #include <tls.h> is needed.
The problem was that without including tls.h uname.os etc. in libc-pic.a
was calling __errno_location(), which caused rtld-errno-loc.os to be
added into librtld.a. But rtld-errno-loc.os would not compile, because
errno was first defined as normal variable in include/errno.h and then
redefined as __thread variable in sysdeps/generic/errno-loc.c.
Though IMHO putting RTLD_PRIVATE_ERRNO case before USE__THREAD
shouldn't hurt.

	Jakub



More information about the Libc-hacker mailing list