Skip to content

Commit

Permalink
Merge branch 'PHP-8.0' into PHP-8.1
Browse files Browse the repository at this point in the history
* PHP-8.0:
  Fix GH-8160: ZTS support on Alpine is broken
  • Loading branch information
cmb69 committed Mar 11, 2022
2 parents 770a544 + 2b2aeb9 commit 0b1bca6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -7,6 +7,7 @@ PHP NEWS
. Fixed freeing of internal attribute arguments. (Bob)
. Fixed bug GH-8070 (memory leak of internal function attribute hash).
(Tim Düsterhus)
. Fixed bug GH-8160 (ZTS support on Alpine is broken). (Michael Voříšek)

- Intl:
. Fixed bug GH-8115 (Can't catch arg type deprecation when instantiating Intl
Expand Down
4 changes: 2 additions & 2 deletions TSRM/TSRM.c
Expand Up @@ -736,13 +736,13 @@ 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__)
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__)
size_t ret;

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

asm ("leal _tsrm_ls_cache@ntpoff,%0"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -260,7 +260,7 @@ AC_MSG_CHECKING([whether we are using musl libc])
if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl
then
AC_MSG_RESULT(yes)
CPPFLAGS="$CPPFLAGS -D__MUSL__"
AC_DEFINE([__MUSL__], [1], [Define when using musl libc])
else
AC_MSG_RESULT(no)
fi
Expand Down
4 changes: 2 additions & 2 deletions ext/opcache/jit/zend_jit_x86.dasc
Expand Up @@ -2956,7 +2956,7 @@ static int zend_jit_setup(void)
# elif defined(__GNUC__) && defined(__x86_64__)
tsrm_ls_cache_tcb_offset = tsrm_get_ls_cache_tcb_offset();
if (tsrm_ls_cache_tcb_offset == 0) {
#if defined(__has_attribute) && __has_attribute(tls_model) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
#if defined(__has_attribute) && __has_attribute(tls_model) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__)
size_t ret;

asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
Expand All @@ -2975,7 +2975,7 @@ static int zend_jit_setup(void)
# elif defined(__GNUC__) && defined(__i386__)
tsrm_ls_cache_tcb_offset = tsrm_get_ls_cache_tcb_offset();
if (tsrm_ls_cache_tcb_offset == 0) {
#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__)
size_t ret;

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

0 comments on commit 0b1bca6

Please sign in to comment.