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

Bug#309193: /usr/bin/gcc: at runtime, TLS does not work, but at compile time, __thread does not give an error



On Thu, May 19, 2005 at 10:41:31PM +0200, Jeroen N. Witmond wrote:
> >
> > Also, note that this is an unsound way to test for TLS.  The compiler,
> > assembler, linker, C library, and on some platforms kernel must all
> > support it.
> >
> 
> I am running debian/sarge (Linux DoornRoosje 2.4.26-1-386 #1 Tue Aug 24
> 13:31:19 JST 2004 i686 GNU/Linux). The versions of gcc and libgcc1 are in
> my previous mail. Where can I find if Debian supports TLS on this
> platform?

It should work.  That's why I asked you for a test case.

> Also, can you point me to a better way to test for TLS?

TLS can be a runtime property, not a compile time one.  Runtime tests
are seriously unwise in autoconf, though, so a compiler check is
probably OK.  For instance, on MIPS the linker may be built with TLS
support but the kernel may be missing the relevant trap handler.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



Reply to: