public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nix at esperi dot org dot uk" <sourceware-bugzilla@sources.redhat.com>
To: glibc-bugs@sources.redhat.com
Subject: [Bug linuxthreads/674] Error compiling linuxthreads in glibc 2.3.4
Date: Tue, 01 Feb 2005 11:20:00 -0000	[thread overview]
Message-ID: <20050201112035.30631.qmail@sourceware.org> (raw)
In-Reply-To: <20050117073135.674.andihartmann@freenet.de>


------- Additional Comments From nix at esperi dot org dot uk  2005-02-01 11:20 -------
(In reply to comment #1)

(tls.h)
> #if defined HAVE_TLS_SUPPORT \
>     && (defined FLOATING_STACKS || !defined IS_IN_libpthread)
> 
> /* Signal that TLS support is available.  */
> # define USE_TLS        1
> [...]

The problem is that _errno, _res, _h_errno and the other symbols causing such
conniptions are declared in errno.c and herrno.c using a construct like this:

#if USE___THREAD
 [defines e.g. herrno as alias for thread variable __libc_h_errno]
#else
 [defines e.g. herrno and _h_errno, and compatibility symbols for them
  in GLIBC_2_0]
#endif

The problem is that because of that `!defined IS_IN_libpthread' in the tls.h
included when the linuxthreads add-on is built, we end up with different values
of USE_TLS, and thus of USE___THREAD, in the libc and in linuxthreads on a
machine without floating stacks. (Specifically, it is true in libc and false in
linuxthreads). Thus linuxthreads looks for exported variables which aren't just
not exported from libc, but don't exist there.

libc's decision is obviously correct: if __thread is available, you *should* use
it for errno; this won't change merely because floating stacks happen to be
available in one particular threading implementation. So something needs to
change in linuxthreads.

I'm still not sure what. That code is a bit of a maze, with HAVE___THREAD and
USE_TLS interacting in ways that are still unclear to me.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=674

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2005-02-01 11:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17  7:31 [Bug linuxthreads/674] New: " andihartmann at freenet dot de
2005-01-31 23:12 ` [Bug linuxthreads/674] " nix at esperi dot org dot uk
2005-02-01 11:20 ` nix at esperi dot org dot uk [this message]
2005-02-01 20:58 ` nix at esperi dot org dot uk
2005-02-02  7:57 ` nix at esperi dot org dot uk
2005-09-16 14:52 ` drepper at redhat dot com
2006-04-25  0:23 ` vapier at gentoo dot org
2006-04-25 23:20 ` vapier at gentoo dot org
2006-04-26 15:13 ` drow at sources dot redhat dot com
2006-04-26 15:37 ` drow at sources dot redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050201112035.30631.qmail@sourceware.org \
    --to=sourceware-bugzilla@sources.redhat.com \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).