[php-src] PR #24362: Fix linking with clang on 32-bit x86: don't use ifunc resolvers
| From: | marc-mabe | Date: | Thu, 15 Oct 2026 19:22:18 +0000 |
| Subject: | [php-src] PR #24362: Fix linking with clang on 32-bit x86: don't use ifunc resolvers | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39487@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24362
Author: marc-mabe
Building for 32-bit x86 with clang (tested: clang 21.1.8,
-m32) fails to link:
```
ld: ext/mbstring/mbstring.o: unsupported non-PIC call to IFUNC `mb_fast_check_utf8'
```
clang calls an ifunc defined in the same translation unit directly (R_386_PC32) instead
of through the PLT, which the linker rejects for PIE output. php_addslashes and
php_base64_* are affected the same way. Such calls exist since PHP 7.3.
Fix: don't use ifunc resolvers with clang on i386, falling back to the existing
function-pointer dispatch. GCC and x86-64 are unchanged.