From 004843655a9f2c9ef4de56d43184adf0ae5095c9 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 3 Dec 2019 11:13:38 +0000 Subject: [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-12-03 Szabolcs Nagy PR libgomp/91938 * configure.tgt: Avoid IE tls on *-*-musl*. libitm/ChangeLog: 2019-12-03 Szabolcs Nagy PR libgomp/91938 * configure.tgt: Avoid IE tls on *-*-musl*. From-SVN: r278932 --- libgomp/ChangeLog | 5 +++++ libgomp/configure.tgt | 3 +++ libitm/ChangeLog | 5 +++++ libitm/configure.tgt | 3 +++ 4 files changed, 16 insertions(+) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 01da5efb8ae..86761d3d479 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2019-12-03 Szabolcs Nagy + + PR libgomp/91938 + * configure.tgt: Avoid IE tls on *-*-musl*. + 2019-11-29 Tobias Burnus * testsuite/libgomp.oacc-fortran/declare-5.f90: Extend by diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index 06ee115ece9..4790a31e394 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/ChangeLog b/libitm/ChangeLog index 21035c05b8c..53085d1bc14 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,8 @@ +2019-12-03 Szabolcs Nagy + + PR libgomp/91938 + * configure.tgt: Avoid IE tls on *-*-musl*. + 2019-09-27 Maciej W. Rozycki * configure: Regenerate. 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. -- 2.30.2