-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Error when building TSRM in ARM64 #11188
Comments
@AndrewKusov Can you provide your Edit: On, this is FreeBSD. We only have a x86 build here. Still, the full error would be good. |
I can reproduce this in an AArch64 emulator running FreeBSD. Full error:
Used this configure line: The proposed fix in the linked thread is not good however, it just disables the JIT and ifdefs the offending code. Note: I have a dev setup where I can take a look at this soon-ish |
Although the issue mentioned FreeBSD, this is a broader problem that might also apply on Linux: the current ARM64 code to load the TLS offset assumes a setup without PIC. If --with-pic is provided, or PHP is built as a shared object, the existing code will not work. We have to call into the TLS descriptor similarly as how the C compiler does it. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator.
Although the issue mentioned FreeBSD, this is a broader problem that might also apply on Linux: the current ARM64 code to load the TLS offset assumes a setup without PIC. If --with-pic is provided, or PHP is built as a shared object, the existing code will not work. We have to call into the TLS descriptor similarly as how the C compiler does it. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator.
Although the issue mentioned FreeBSD, this is a broader problem that might also apply on Linux: the current ARM64 code to load the TLS offset assumes a setup with the default TLS model. If --with-pic is provided, or PHP is built as a shared object, the existing code will not work. We have to call into the TLS descriptor similarly as how the C compiler does it. This patch adds the code that handles the different TLS model cases. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator.
Although the issue mentioned FreeBSD, this is a broader problem that might also apply on Linux: the current ARM64 code to load the TLS offset assumes a setup with the default TLS model. If --with-pic is provided, or PHP is built as a shared object, the existing code will not work. We have to call into the TLS descriptor similarly as how the C compiler does it. This patch adds the code that handles the different TLS model cases. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator.
Although the issue mentioned FreeBSD, this is a broader problem: the current ARM64 code to load the TLS offset assumes a setup with the non-default TLS model. We have to call into the TLS descriptor similar as how the C compiler does it. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator.
Although the issue mentioned FreeBSD, this is a broader problem: the current ARM64 code to load the TLS offset assumes a setup with the non-default TLS model. This problem can also apply on some configurations on other platforms. For the default mode, we have to call into the TLS descriptor similar as how the C compiler does it. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator. Similarly, this patch adds support for other TLS models too.
Although the issue mentioned FreeBSD, this is a broader problem: the current ARM64 code to load the TLS offset assumes a setup with the non-default TLS model. This problem can also apply on some configurations on other platforms. For the default mode, we have to call into the TLS descriptor similar as how the C compiler does it. Although it looks like a lot of inline assembly, the compiler actually optimizes this into only a few instructions on my emulator. Similarly, this patch adds support for other TLS models too.
Although the issue mentioned FreeBSD, this is a broader problem: the current ARM64 code to load the TLS offset assumes a setup with the non-default TLS model. This problem can also apply on some configurations on other platforms.
Although the issue mentioned FreeBSD, this is a broader problem: the current ARM64 code to load the TLS offset assumes a setup with the non-default TLS model. This problem can also apply on some configurations on other platforms.
* PHP-8.2: Fix GH-11188: Error when building TSRM in ARM64
* PHP-8.3: Fix GH-11188: Error when building TSRM in ARM64
This is phpGH-11236 for IR JIT.
Description
When building in ARM64 with the --enable-zts flag, I get an error similar to the one described in this bug report - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266175. Please make corrections for TSRM for this architecture, they are already available on the website
PHP Version
PHP 8.2.5
Operating System
No response
The text was updated successfully, but these errors were encountered: