diff options
author | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-04-29 05:42:48 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-04-29 05:42:48 +0000 |
commit | ca0ddb398fb6173eb97c5d70265e79b9ea2bdc9d (patch) | |
tree | b74922652edb3757230c8158fc835b10c7113bc7 /libphobos/libdruntime/gcc | |
parent | be79ec008e8ef292fa1e770d2e87bcb40861f3ea (diff) | |
download | gcc-ca0ddb398fb6173eb97c5d70265e79b9ea2bdc9d.zip gcc-ca0ddb398fb6173eb97c5d70265e79b9ea2bdc9d.tar.gz gcc-ca0ddb398fb6173eb97c5d70265e79b9ea2bdc9d.tar.bz2 |
libphobos: Fix multilib builds for s390x-linux-gnu
Merges upstream druntime aab44549, phobos 3dc363783.
Reviewed-on: https://github.com/dlang/druntime/pull/2590
https://github.com/dlang/phobos/pull/6983
libphobos/ChangeLog:
2019-04-28 Iain Buclaw <ibuclaw@gdcproject.org>
* libdruntime/gcc/sections/elf_shared.d (IBMZ_Any): Define when
version S390 or SystemZ. Use condition instead of SystemZ.
(getTLSRange): Return null on GNU_EMUTLS targets.
From-SVN: r270639
Diffstat (limited to 'libphobos/libdruntime/gcc')
-rw-r--r-- | libphobos/libdruntime/gcc/sections/elf_shared.d | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/libphobos/libdruntime/gcc/sections/elf_shared.d b/libphobos/libdruntime/gcc/sections/elf_shared.d index 1eafecd..7f9036b 100644 --- a/libphobos/libdruntime/gcc/sections/elf_shared.d +++ b/libphobos/libdruntime/gcc/sections/elf_shared.d @@ -24,6 +24,8 @@ module gcc.sections.elf_shared; version (RISCV32) version = RISCV_Any; version (RISCV64) version = RISCV_Any; +version (S390) version = IBMZ_Any; +version (SystemZ) version = IBMZ_Any; version (CRuntime_Glibc) enum SharedELF = true; else version (CRuntime_Musl) enum SharedELF = true; @@ -1060,7 +1062,7 @@ else version (MIPS32) enum TLS_DTV_OFFSET = 0x8000; else version (MIPS64) enum TLS_DTV_OFFSET = 0x8000; -else version (SystemZ) +else version (IBMZ_Any) enum TLS_DTV_OFFSET = 0x0; else static assert( false, "Platform not supported." ); @@ -1070,20 +1072,25 @@ void[] getTLSRange(size_t mod, size_t sz) nothrow @nogc if (mod == 0) return null; - version (Solaris) + version (GNU_EMUTLS) + return null; // Handled in scanTLSRanges(). + else { - static if (!OS_Have_Dlpi_Tls_Modid) - mod -= 1; - } + version (Solaris) + { + static if (!OS_Have_Dlpi_Tls_Modid) + mod -= 1; + } - // base offset - auto ti = tls_index(mod, 0); - version (SystemZ) - { - auto idx = cast(void *)__tls_get_addr_internal(&ti) - + cast(ulong)__builtin_thread_pointer(); - return idx[0 .. sz]; + // base offset + auto ti = tls_index(mod, 0); + version (IBMZ_Any) + { + auto idx = cast(void *)__tls_get_addr_internal(&ti) + + cast(ulong)__builtin_thread_pointer(); + return idx[0 .. sz]; + } + else + return (__tls_get_addr(&ti)-TLS_DTV_OFFSET)[0 .. sz]; } - else - return (__tls_get_addr(&ti)-TLS_DTV_OFFSET)[0 .. sz]; } |