bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BFD config.h correctly #undefs 'TLS' (my compiler is old), but then


From: Nick Clifton
Subject: Re: BFD config.h correctly #undefs 'TLS' (my compiler is old), but then bfd.c uses it anyway. Result is build failure.
Date: Wed, 27 Nov 2024 12:10:00 +0000
User-agent: Mozilla Thunderbird

Hi Gordon,

>> Result is build failure.

What specifically fails ?

And where exactly are you adding the "#undef TLS"  ?


I am not enormously familiar with the mechanics of thread-local
storage, but I get the impression that optionally doing without it
would be next to impossible given the way that bfd.c is written.

Really ?  The only reason that bfd.c is using thread local storage
is so that it can work with multi-threaded applications that use the
bfd library.  The bfd library itself is single threaded, and it only
uses thread local storage for static variables that have compilation
unit scope.

One possible solution is to use the 2.41 binutils release (or earlier).
Support for thread local storage in bfd.c was only added in the 2.42
release, so using an earlier one should solve your problems.


Should the ./configure script be throwing up an error and refusing to
proceed if TLS is not available?

No - it should continue to work and just provide an empty definition
of the TLS macro.  See bfd/ax_tls.m4 for the configure code that is
supposed to determine in the compiler supports TLS.  It is possible
that there is a bug in this code and that it is not performing correctly
when a compiler does not have any thread support at all.  If so, please
could you report this bug using the binutils bugzilla system:

  https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils

Cheers
  Nick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]