Skip to content

Commit

Permalink
Haiku fix ZTS build disabling tsrm_ls_cache usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen authored and cmb69 committed Apr 26, 2022
1 parent 52a18a6 commit 4bb0dd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -2,6 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2022, PHP 8.0.20

- Core:
. Fixed Haiku ZTS builds. (David Carlier)

12 May 2022, PHP 8.0.19

Expand Down
6 changes: 4 additions & 2 deletions TSRM/TSRM.c
Expand Up @@ -736,13 +736,15 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void)
#if defined(__APPLE__) && defined(__x86_64__)
// TODO: Implement support for fast JIT ZTS code ???
return 0;
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__)
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__) && \
!defined(__OpenBSD__) && !defined(__MUSL__) && !defined(__HAIKU__)
size_t ret;

asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
: "=r" (ret));
return ret;
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__)
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__) && \
!defined(__OpenBSD__) && !defined(__MUSL__) && !defined(__HAIKU__)
size_t ret;

asm ("leal _tsrm_ls_cache@ntpoff,%0"
Expand Down

0 comments on commit 4bb0dd4

Please sign in to comment.