Skip to content

Fix linker failure when building opcache statically #18939

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Add __x86_64__ guard for consistency
  • Loading branch information
arnaud-lb committed Jun 30, 2025
commit 095b051b4709165529fcd001c61462776b68ff97
3 changes: 3 additions & 0 deletions ext/opcache/jit/tls/zend_jit_tls_darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void *zend_jit_tsrm_ls_cache_address(
size_t module_offset
) {

#if defined(__x86_64__)
if (tcb_offset) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need __x86_64__ guards for this function body?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add them because this is the only supported architecture for JIT+ZTS on MacOS, and the only one tested as well. I should probably add them for consistency.

I plan to add support for JIT+ZTS on Apple Silicone later.

char *addr;
__asm__ __volatile__(
Expand All @@ -75,5 +76,7 @@ void *zend_jit_tsrm_ls_cache_address(
);
return base + module_offset;
}
#endif

return NULL;
}
Loading