-
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
Build fails on 32-bit Linux and FreeBSD with Clang #14467
Comments
Might not be related but ifunc had been disabled for quite a time on freebsd then had been enabled for freebsd >= 12 months ago. But nielsdos was willing to look into this I believe so we ll see :) |
To keep in mind for future update
|
I can reproduce this for FreeBSD at least, didn't test for Linux (yet). You can reproduce the problem simply with: int x;
int foo(void) { return x; } Compile with It doesn't happen on 64-bit because IIRC fPIC is mandatory there. |
We have a report of this as well with our hardened gcc: https://bugs.gentoo.org/930145 |
Description
The following code:
Resulted in this output on FreeBSD 14 32-bit with Clang 16.0.6 (default compiler selected by the system):
But I expected this output instead:
On Debian 32-bit with Clang this happens:
When using GCC it works ok. Issue is that there is a check to disable PIC mode for shared extensions on 32-bit Linux and FreeBSD:
php-src/configure.ac
Lines 242 to 257 in bbbe56e
(Probably solution would be to skip the non-PIC mode for Clang on 32-bit)
PHP Version
PHP 8.2, 8.3 and 8.4-dev
Operating System
32-bit Linux and FreeBSD
The text was updated successfully, but these errors were encountered: