aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-04-20 18:20:12 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2020-04-21 14:19:13 +0200
commitac1a0a388cd9529b4ba8b10d8ccd8099a2a95b23 (patch)
treef99abc45fa3539cbc1ff479320b4de061f1a781d /libphobos/libdruntime
parent187bdbd5645ff5271bee436e0c854a11b69e9570 (diff)
downloadgcc-ac1a0a388cd9529b4ba8b10d8ccd8099a2a95b23.zip
gcc-ac1a0a388cd9529b4ba8b10d8ccd8099a2a95b23.tar.gz
gcc-ac1a0a388cd9529b4ba8b10d8ccd8099a2a95b23.tar.bz2
libphobos: Fix compilation dependencies on s390x-linux-musl
libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Call DRUNTIME_LIBRARIES_UCONTEXT. * m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_UCONTEXT): Define to search libraries for swapcontext. * libdruntime/gcc/sections/elf_shared.d (getTLSRange): Always use __tls_get_addr on Musl. Co-Authored-By: Mathias Lang <pro.mathias.lang@gmail.com>
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/gcc/sections/elf_shared.d4
1 files changed, 3 insertions, 1 deletions
diff --git a/libphobos/libdruntime/gcc/sections/elf_shared.d b/libphobos/libdruntime/gcc/sections/elf_shared.d
index 7ff87a8..59e2dd6 100644
--- a/libphobos/libdruntime/gcc/sections/elf_shared.d
+++ b/libphobos/libdruntime/gcc/sections/elf_shared.d
@@ -1084,7 +1084,9 @@ void[] getTLSRange(size_t mod, size_t sz) nothrow @nogc
// base offset
auto ti = tls_index(mod, 0);
- version (IBMZ_Any)
+ version (CRuntime_Musl)
+ return (__tls_get_addr(&ti)-TLS_DTV_OFFSET)[0 .. sz];
+ else version (IBMZ_Any)
{
// IBM Z only provides __tls_get_offset instead of __tls_get_addr
// which returns an offset relative to the thread pointer.