[cygwin] libjava/java/lang/natClass.cc:904: error: thread-local storage not supported for this target
Andrew Haley
aph@redhat.com
Thu Oct 12 10:13:00 GMT 2006
Christian Joensson writes:
> Currently, and it's been there for a while, I get the following error
> on gcc trunk:
>
> ../../../gcc/libjava/java/lang/natClass.cc:904: error: thread-local
> storage not supported for this target
> make[3]: *** [java/lang/natClass.lo] Error 1
> make[3]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libjava'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libjava'
> make[1]: *** [all-target-libjava] Error 2
> make[1]: Leaving directory `/usr/local/src/trunk/objdir'
> make: *** [all] Error 2
>
> My system is this:
>
> Windows XP Pro/SP2 cygwin Pentium M processor 2.13GHz system with packages:
>
> binutils 20060817-1 2.17.50 20060817
> bison 2.3-1 2.3
> cygwin 1.5.21-2
> dejagnu 20021217-2 1.4.2.x
> expect 20030128-1 5.26
> gcc 3.4.4-1
> gcc-ada 3.4.4-1
> gcc-g++ 3.4.4-1
> gmp 4.1.4-2
> make 3.81-1
> tcltk 20060202-1 8.4
> w32api 3.7-1
>
>
> and the configure was done like this:
>
> ../gcc/configure --enable-nls --without-included-gettext
> --enable-version-specific-runtime-libs --without-x --enable-libgcj
> --with-system-zlib --enable-threads=posix
> --enable-languages=c,ada,c++,fortran,java,objc,obj-c++,treelang
>
> Now, am I doing something terribly wrong here or is this a well know "bug"?
That __thread variable is surrounded by HAVE_TLS. There is a
configure test which simply compiles this line:
__thread int foo;
and that configure test must succeed for HAVE_TLS to be set. So, to
fix this we need to find out if that program did compile, and if so,
how.
--disable-tls in the configure line might solve your problem.
Andrew.
More information about the Gcc
mailing list