-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix compilation errors on Cygwin #16568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ache-jit --enable-zts` configure options on Cygwin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right. A proper fix would likely be something like 4bb0dd4. Maybe
TSRM/TSRM.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 81136bee4d..e99993204b 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -778,7 +778,7 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void)
return 0;
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__) && \
!defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__) && \
- !defined(__HAIKU__)
+ !defined(__HAIKU__) && !defined(__CYGWIN__)
size_t ret;
asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
@@ -786,7 +786,7 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void)
return ret;
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__) && \
!defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__MUSL__) && \
- !defined(__HAIKU__)
+ !defined(__HAIKU__) && !defined(__CYGWIN__)
size_t ret;
asm ("leal _tsrm_ls_cache@ntpoff,%0"
Note that I do not have a Cygwin environment set up.
cc @devnexen
sed -i.backup 's/!defined(__HAIKU__)/!defined(__HAIKU__) \&\& !defined(__CYGWIN__)/' TSRM/TSRM.c
|
Can anybody confirm that the patch from #16568 (review) actually works for Cygwin builds? |
If nobody is into it, I ll try to install cygwin in my windows laptop and gives it a go tonight. |
See #16920. I think we can close this PR. |
The actual problem with this patch is that you can no longer build OPcache/JIT via phpize, because then |
compilation errors when using the
--enable-opcache
,--disable-opcache-jit
, and--enable-zts
configure options on Cygwin.The
tsrm_get_ls_cache_tcb_offset
function is used exclusively in JIT. When JIT is disabled, this function should also be disabled.Error