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]

[PATCH] musl: Fix invalid tls model in libgomp and libitm PR91938


Musl does not support initial-exec tls in dynamically loaded shared
libraries.

libgomp/ChangeLog:

2019-11-15  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* configure.tgt: Avoid IE tls on *-*-musl*.

libitm/ChangeLog:

2019-11-15  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* configure.tgt: Avoid IE tls on *-*-musl*.
diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index b88bf72fe3d..747d0485bf8 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -17,6 +17,9 @@ if test $gcc_cv_have_tls = yes ; then
     *-*-k*bsd*-gnu*)
 	;;
 
+    *-*-musl*)
+	;;
+
     *-*-linux* | *-*-gnu*)
 	XCFLAGS="${XCFLAGS} -ftls-model=initial-exec -DUSING_INITIAL_EXEC_TLS"
 	;;
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index eea865d6aa3..0bdca1123cc 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -31,6 +31,9 @@
 if test "$gcc_cv_have_tls" = yes ; then
   case "${target}" in
 
+    *-*-musl*)
+	;;
+
     # For x86, we use slots in the TCB head for most of our TLS.
     # The setup of those slots in beginTransaction can afford to
     # use the global-dynamic model.

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