Also update patches and remove obsolete ones. We also need to add one to prevent mod_php to be enabled by apxs in configuration file. While at, remove the VARIANT setting for pecl extensions. Signed-off-by: Michael Heimpold <mhei@heimpold.de>lilik-openwrt-22.03
@ -1,95 +0,0 @@ | |||
From: Thijs Kinkhorst <thijs@debian.org> | |||
Date: Mon, 2 Dec 2019 22:18:43 +0100 | |||
Subject: Add patch to remove build timestamps from generated binaries. | |||
--- | |||
--- a/ext/standard/info.c | |||
+++ b/ext/standard/info.c | |||
@@ -792,7 +792,6 @@ PHPAPI ZEND_COLD void php_print_info(int | |||
php_info_print_box_end(); | |||
php_info_print_table_start(); | |||
php_info_print_table_row(2, "System", ZSTR_VAL(php_uname)); | |||
- php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); | |||
#ifdef PHP_BUILD_SYSTEM | |||
php_info_print_table_row(2, "Build System", PHP_BUILD_SYSTEM); | |||
#endif | |||
--- a/sapi/apache2handler/config.m4 | |||
+++ b/sapi/apache2handler/config.m4 | |||
@@ -64,18 +64,9 @@ if test "$PHP_APXS2" != "no"; then | |||
fi | |||
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` | |||
- if test -z `$APXS -q SYSCONFDIR`; then | |||
- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ | |||
- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ | |||
- -i -n php" | |||
- else | |||
- APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` | |||
- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ | |||
- \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ | |||
- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ | |||
- -S SYSCONFDIR='$APXS_SYSCONFDIR' \ | |||
- -i -a -n php" | |||
- fi | |||
+ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ | |||
+ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ | |||
+ -i -n php" | |||
LIBPHP_CFLAGS="-shared" | |||
PHP_SUBST(LIBPHP_CFLAGS) | |||
--- a/sapi/cgi/cgi_main.c | |||
+++ b/sapi/cgi/cgi_main.c | |||
@@ -2372,9 +2372,9 @@ parent_loop_end: | |||
SG(headers_sent) = 1; | |||
SG(request_info).no_headers = 1; | |||
#if ZEND_DEBUG | |||
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); | |||
+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); | |||
#else | |||
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); | |||
+ php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); | |||
#endif | |||
php_request_shutdown((void *) 0); | |||
fcgi_shutdown(); | |||
--- a/sapi/cli/php_cli.c | |||
+++ b/sapi/cli/php_cli.c | |||
@@ -633,8 +633,8 @@ static int do_cli(int argc, char **argv) | |||
goto out; | |||
case 'v': /* show php version & quit */ | |||
- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s", | |||
- PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, | |||
+ php_printf("PHP %s (%s) ( %s)\nCopyright (c) The PHP Group\n%s", | |||
+ PHP_VERSION, cli_sapi_module.name, | |||
#ifdef ZTS | |||
"ZTS " | |||
#else | |||
--- a/sapi/fpm/fpm/fpm_main.c | |||
+++ b/sapi/fpm/fpm/fpm_main.c | |||
@@ -1692,9 +1692,9 @@ int main(int argc, char *argv[]) | |||
SG(request_info).no_headers = 1; | |||
#if ZEND_DEBUG | |||
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); | |||
+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); | |||
#else | |||
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); | |||
+ php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); | |||
#endif | |||
php_request_shutdown((void *) 0); | |||
fcgi_shutdown(); | |||
--- a/sapi/phpdbg/phpdbg.c | |||
+++ b/sapi/phpdbg/phpdbg.c | |||
@@ -1634,10 +1634,8 @@ phpdbg_main: | |||
phpdbg_do_help_cmd(exec); | |||
} else if (show_version) { | |||
phpdbg_out( | |||
- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) The PHP Group\n%s", | |||
+ "phpdbg %s\nPHP %s, Copyright (c) The PHP Group\n%s", | |||
PHPDBG_VERSION, | |||
- __DATE__, | |||
- __TIME__, | |||
PHP_VERSION, | |||
get_zend_version() | |||
); |
@ -1,14 +0,0 @@ | |||
--- a/sapi/litespeed/lsapi_main.c | |||
+++ b/sapi/litespeed/lsapi_main.c | |||
@@ -1276,9 +1276,9 @@ static int cli_main( int argc, char * ar | |||
case 'v': | |||
if (php_request_startup() != FAILURE) { | |||
#if ZEND_DEBUG | |||
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); | |||
+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); | |||
#else | |||
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); | |||
+ php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); | |||
#endif | |||
#ifdef PHP_OUTPUT_NEWAPI | |||
php_output_end_all(); |
@ -1,60 +0,0 @@ | |||
From dd6ee0fb6715881b204fb4cb124db9134c1a6c7d Mon Sep 17 00:00:00 2001 | |||
From: Michael Heimpold <mhei@heimpold.de> | |||
Date: Mon, 2 Dec 2019 22:42:28 +0100 | |||
Subject: [PATCH] ext/opcache: fix detection of shm/mmap | |||
The detection of sysvipc and mmap doesn't work well when cross-compiling, | |||
so I decided to only check for the availability of the functions involved. | |||
This is not a clean solution, but works for now(tm) :-) | |||
It should be discussed with upstream to find a better solution. | |||
This solves the issue reported at | |||
https://github.com/openwrt/packages/issues/1010 | |||
and makes opcache usable on OpenWrt. | |||
Signed-off-by: Michael Heimpold <mhei@heimpold.de> | |||
--- | |||
ext/opcache/config.m4 | 10 ++++++++-- | |||
1 file changed, 8 insertions(+), 2 deletions(-) | |||
--- a/ext/opcache/config.m4 | |||
+++ b/ext/opcache/config.m4 | |||
@@ -167,7 +167,10 @@ int main() { | |||
} | |||
]])],[dnl | |||
AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | |||
- have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no]) | |||
+ have_shm_ipc=yes],[have_shm_ipc=no],[dnl | |||
+ AC_CHECK_FUNC(shmget,[dnl | |||
+ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | |||
+ have_shm_ipc=yes],[have_shm_ipc=no])]) | |||
AC_MSG_RESULT([$have_shm_ipc]) | |||
AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) | |||
@@ -219,7 +222,10 @@ int main() { | |||
} | |||
]])],[dnl | |||
AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | |||
- have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_anon=no]) | |||
+ have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[dnl | |||
+ AC_CHECK_FUNC(mmap,[dnl | |||
+ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | |||
+ have_shm_mmap_anon=yes],[have_shm_mmap_anon=no])]) | |||
AC_MSG_RESULT([$have_shm_mmap_anon]) | |||
PHP_CHECK_FUNC_LIB(shm_open, rt, root) | |||
@@ -294,8 +300,11 @@ int main() { | |||
PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) | |||
],[ | |||
AC_MSG_RESULT([no]) | |||
- ],[ | |||
- AC_MSG_RESULT([no]) | |||
+ ],[dnl | |||
+ AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | |||
+ AC_MSG_RESULT([yes]) | |||
+ have_shm_mmap_posix=yes | |||
+ PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) | |||
]) | |||
PHP_NEW_EXTENSION(opcache, |
@ -1,20 +0,0 @@ | |||
From 73ea1d44c1e6b063bfa02e12919ec8a9de3709d8 Mon Sep 17 00:00:00 2001 | |||
From: Michael Heimpold <mhei@heimpold.de> | |||
Date: Wed, 3 Feb 2021 22:51:34 +0100 | |||
Subject: [PATCH] Fix opcache jit minilua compiling | |||
Signed-off-by: Michael Heimpold <mhei@heimpold.de> | |||
--- | |||
ext/opcache/jit/Makefile.frag | 2 +- | |||
1 file changed, 1 insertion(+), 1 deletion(-) | |||
--- a/ext/opcache/jit/Makefile.frag | |||
+++ b/ext/opcache/jit/Makefile.frag | |||
@@ -1,6 +1,6 @@ | |||
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c | |||
- $(CC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@ | |||
+ $(HOSTCC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@ | |||
$(builddir)/jit/zend_jit_x86.c: $(srcdir)/jit/zend_jit_x86.dasc $(srcdir)/jit/dynasm/*.lua $(builddir)/minilua | |||
$(builddir)/minilua $(srcdir)/jit/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(srcdir)/jit/zend_jit_x86.dasc |
@ -0,0 +1,11 @@ | |||
--- a/sapi/apache2handler/config.m4 | |||
+++ b/sapi/apache2handler/config.m4 | |||
@@ -74,7 +74,7 @@ if test "$PHP_APXS2" != "no"; then | |||
\$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ | |||
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ | |||
-S SYSCONFDIR='$APXS_SYSCONFDIR' \ | |||
- -i -a -n php" | |||
+ -i -n php" | |||
fi | |||
LIBPHP_CFLAGS="-shared" |