This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[build] Disable native TLS support on IRIX 6/Tru64 UNIX


I noticed that all TLS execution tests were failing on IRIX 6.5 because
they didn't link:

ld32: FATAL   2  : Internal: at ../../ld/relocate.c &relc_attr_mips table inconsistent with number of relocation entries

Further investigation revealed that the object files included TLS
relocations (since gas 2.20.1 is in use and gas is required for all MIPS
targets), but the native linker doesn't know about them and errors out
as above.  <sys/elf.h> shows that the system knows about none of the TLS
relocs (R_MIPS_JALR is the last one listed), and even if gld were in
use (which doesn't work as of 2.20.1, cf. PR target/43533), this
wouldn't help since rld and libc.so lack TLS support.  So I'm completely
disabling native TLS support to avoid this issue.  First tested with a
--disable-tls bootstrap (which is a misnomer right now, this should
rather be --disable-native-tls now), which fixed the TLS tests, but
introduced a couple of other failures.  I'll investigate them later, but
this patch is still the right thing to do: native TLS simply cannot work
on this target.

While I'm at it, I'm also disabling native TLS on Tru64 UNIX which might
later run into similar issues: while as of 2.20.1, gas doesn't work
(there are open PRs for that) and gld isn't fully supported (no shared
library support), I'd like to avoid hitting the same problem later on
since that platform hasn't native TLS support either.

mips-sgi-irix6.5 bootstrap in progress; will commit once that has
finished.

	Rainer


2010-10-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* configure.ac (*-*-irix6*): Disable set_have_as_tls.
	(*-*-osf*): Likewise.
	* configure: Regenerate.

diff -r 96121b207452 gcc/configure.ac
--- a/gcc/configure.ac	Thu Oct 28 15:36:20 2010 +0200
+++ b/gcc/configure.ac	Thu Oct 28 16:32:37 2010 +0200
@@ -2998,6 +2998,16 @@
   [set_have_as_tls=yes])
 fi
 case "$target" in
+  *-*-irix6*)
+    # IRIX 6.5 rld and libc.so lack TLS support, so even if gas and gld
+    # with TLS support are in use, native TLS cannot work.
+    set_have_as_tls=no
+    ;;
+  *-*-osf*)
+    # Tru64 UNIX loader and libc.so lack TLS support, so even if gas and
+    # gld with TLS support are in use, native TLS cannot work.
+    set_have_as_tls=no
+    ;;
   # TLS was introduced in the Solaris 9 FCS release and backported to
   # Solaris 8 patches.  Support for GNU-style TLS on x86 was only
   # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]