[php-src] PR #11236: Fix GH-11188: Error when building TSRM in ARM64
| From: | nielsdos | Date: | Fri, 12 May 2023 18:24:42 +0000 |
| Subject: | [php-src] PR #11236: Fix GH-11188: Error when building TSRM in ARM64 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-22505@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11236
Author: nielsdos
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.