From ac1a0a388cd9529b4ba8b10d8ccd8099a2a95b23 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Mon, 20 Apr 2020 18:20:12 +0200 Subject: 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 --- libphobos/libdruntime/gcc/sections/elf_shared.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libphobos/libdruntime/gcc') 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. -- cgit v1.1