diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index c3b49d9d888fc..79e2b3d3789ec 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -221,6 +221,8 @@ PHP 8.4 INTERNALS UPGRADE NOTES - ac_cv_write_stdout -> php_cv_have_write_stdout and all other checks wrapped with their belonging cache variables (see *.m4 source files for details). + - New configure-phase environment variable PHP_EXTRA_CFLAGS to append + additional build-time CFLAGS to the PHP build. c. Windows build system changes - The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19, diff --git a/configure.ac b/configure.ac index f30f58983fa3b..8e84fdae36b8e 100644 --- a/configure.ac +++ b/configure.ac @@ -1431,6 +1431,12 @@ AS_VAR_IF([PHP_BUILD_ARCH],,, [AC_DEFINE_UNQUOTED([PHP_BUILD_ARCH], ["$PHP_BUILD_ARCH"], [The build architecture.])]) +AC_ARG_VAR([PHP_EXTRA_CFLAGS], + [Additional build-phase compilation options appended to CFLAGS when building + PHP; these are isolated from the Autoconf configure checks and its CFLAGS]) +AS_VAR_IF([PHP_EXTRA_CFLAGS],,, [EXTRA_CFLAGS=$PHP_EXTRA_CFLAGS]) + +PHP_SUBST([EXTRA_CFLAGS]) PHP_SUBST([PHP_FASTCGI_OBJS]) PHP_SUBST([PHP_SAPI_OBJS]) PHP_SUBST([PHP_BINARY_OBJS])