Bug 25816 - [4.1/4.2 Regression] Configure detects TLS, but glibc does not support it.
[4.1/4.2 Regression] Configure detects TLS, but glibc does not support it.
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: libgcj
4.1.0
: P3 normal
: 4.1.0
Assigned To: David Daney
: link-failure, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-17 05:15 UTC by David Daney
Modified: 2006-01-25 00:47 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: mipsel-linux
Build: i686-pc-linux-gnu
Known to work: 3.1.1 3.4.3 4.0.2
Known to fail: 4.1.0
Last reconfirmed: 2006-01-24 06:20:43


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Daney 2006-01-17 05:15:32 UTC
I have a mipsel-linux system with glibc 2.3.3 which does not support TLS.  Due to bugs in earlier binutils versions, I must use a binutils version that does support TLS on mips.  The GCC configure does an assembler check to see if TLS is supported and then generates code based on that decision.

When this happens with no TLS support in glibc, there is a link error due to lack of TLS support in glibc.

I am testing a patch that adds a --disable-tls option to configure to force it to not use TLS.

This was not a problem on 4.0 and earlier as there was no mips TLS support in GCC in those versions.  I am calling it a regression as I used to be able to use GCC and with 4.1 I cannot.

The test case is to compile any java program with mipsel-linux-gcj.  A linker error results.
Comment 1 Andrew Pinski 2006-01-17 13:24:17 UTC
Oh, this is a regression because the more use of TLS in the libraries.
Comment 2 David Daney 2006-01-17 17:31:23 UTC
My current patch is here:

http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00950.html

Comment 3 David Daney 2006-01-25 00:11:48 UTC
Subject: Bug 25816

Author: daney
Date: Wed Jan 25 00:11:41 2006
New Revision: 110190

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110190
Log:
	PR java/25816
	* configure.ac (enable_tls): New enable option.
	(HAVE_AS_TLS): Don't do assembler check if enable_tls set.
	* configure: Regenerate.
	* doc/install.texi (--enable-tls): Document new option.
	(--disable-tls): Ditto.

Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/configure
    branches/gcc-4_1-branch/gcc/configure.ac
    branches/gcc-4_1-branch/gcc/doc/install.texi

Comment 4 David Daney 2006-01-25 00:42:23 UTC
Subject: Bug 25816

Author: daney
Date: Wed Jan 25 00:42:17 2006
New Revision: 110199

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110199
Log:
	PR java/25816
	* configure.ac (enable_tls): New enable option.
	(HAVE_AS_TLS): Don't do assembler check if enable_tls set.
	* configure: Regenerate.
	* doc/install.texi (--enable-tls): Document new option.
	(--disable-tls): Ditto.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/configure
    trunk/gcc/configure.ac
    trunk/gcc/doc/install.texi

Comment 5 David Daney 2006-01-25 00:47:45 UTC
Fixed now.