Building without thread support

Jim Blandy jimb at
Sat Sep 23 04:06:46 UTC 2006

Mike Frysinger <vapier at> writes:
> On Friday 22 September 2006 12:51, Peter Kjellerstedt wrote:
>> While I was looking for a another problem, I tried to build
>> the latest svn version of uClibc without thread support.
>> This failed on the first file it tried to compile, and I had
>> to apply the following patch to make it compile.
>> Any comments, or should I go ahead and commit it?
> certainly ... we should even take it another step and wrap it in a TLS check 
> as not all architectures have TLS support yet ...

While you're at it, Peter --- there are actually *two* inclusions of
<tls.h> in that file; you may want to factor them out into one

That said, if I understood right, Peter Mazinger's plan is to make a
new header, include/tls.h, that can be safely #included by any code in
uClibc, regardless of what thread model the user has chosen, if any.
It'll then define the Right Things to let you know whether you can use
__thread.  So following that plan, the fix would be to move the checks
into a new include/tls.h.

I'm guessing the mistake that broke the build was that code assuming
an all-model <tls.h> got placed in uClibc_errno.h before the actual
<tls.h> itself was added.  :)

More information about the uClibc mailing list