-
Notifications
You must be signed in to change notification settings - Fork 426
Description
Describe you feature request
Is your feature request related to a problem? Please describe.
See: https://github.com/php/frankenphp/blob/main/frankenphp.go#L19
FrankenPHP builds keep exhibiting unexpected behaviour due to the inclusion of compiler/linker flags in the source code. Just yesterday I spent a day chasing build failures caused by these flags and compilers inconsistencies in handling them.
https://github.com/crazywhalecc/static-php-cli/actions/runs/16094560246/job/45415603297
Can you spot the failure? The go linker invokes the c linker and silently! passes -L/usr/lib as a search path, leading to libphp.so in the github runners system folder being picked up and linked against, even though we only pass -L/static-php-cli/buildroot/lib. Zig cc has issues with inconsistent order anyway, but turns out Clang and Gcc also prefer to pull in the shared library if it's available.
The same goes for the header include flags.
Describe the solution you'd like
Remove the "magic" extra compiler flags and force users to explicitly pass them.
Describe alternatives you've considered
Alternatively, add a build tag that disables them (I could imagine that may be possible?).