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]

[libgomp] Restrict TLS model optimization


It doesn't work on SPARC/Solaris 10, all execution tests segfault while 
initializing TLS data.  Would local-dynamic be appropriate instead?

Tested on SPARC/Solaris 10 and AMD64/Linux, OK for mainline?


2006-02-15  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* configure.tgt: Force initial-exec TLS model on Linux only.


-- 
Eric Botcazou
Index: configure.tgt
===================================================================
--- configure.tgt	(revision 110691)
+++ configure.tgt	(working copy)
@@ -13,9 +13,14 @@
 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
 # This does require that the library be present during process 
 # startup, so mark the library as not to be dlopened.
-if test $have_tls = yes && test "$with_gnu_ld" = "yes"; then
+if test $have_tls = yes ; then
+  case "${target}" in
+
+    *-*-linux*)
 	XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
 	XLDFLAGS="${XLDFLAGS} -Wl,-z,nodlopen"
+	;;
+  esac
 fi
 
 # Since we require POSIX threads, assume a POSIX system by default.

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