Skip to content

Conversation

@arnaud-lb
Copy link
Contributor

The PHP configure script makes decisions based on the target CPU (e.g. whether to enable JIT). When cross compiling we need to specify which host-system we are building for, with --host=, otherwise the configure script assumes it's the same as the build machine.

emconfigure doesn't pass --host automatically.

--host affects variables such as $host_cpu. We inspect this variable as least to determine whether to enable JIT: https://github.com/php/php-src/blob/98e0dbcefedeecf5e4d032e54df1aeebaa118754/ext/opcache/config.m4#L26-L30. When not passing --host, JIT may be enabled when the target is not supported, which fails later: https://github.com/php/php-src/blob/98e0dbcefedeecf5e4d032e54df1aeebaa118754/ext/opcache/jit/zend_jit.h#L29.

Along with php/php-src#19350, this fixes the build for alpha4.

The PHP configure script makes decisions based on the target CPU (e.g.
whether to enable JIT). When cross compiling we need to specify which
host-system we are building for, with --host=. emconfigure doesn't to
it automatically.
@derickr derickr merged commit 19bd959 into derickr:main Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants