Skip to contentSkip to conversation

php: upgrade 7.4.21 -> 8.0.11

PATCH In review Wang Mingyu 3 participants 13 messages Oct 18, 2021 – Nov 17, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 php: upgrade 7.4.21 -> 8.0.11

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after write).

    (cmb)
  . Fixed bug #73122 (Integer Overflow when concatenating strings). (cmb)
-GD:
  . Fixed bug #53580 (During resize gdImageCopyResampled cause colors change).
    (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths). (cmb) . Fixed bug #81400 (Unterminated string in dns_get_record() results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code). (cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword). (Remi) . Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

    (cmb)
---
 ...001-opcache-config.m4-enable-opcache.patch | 113 +++++++++++++++---
 .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
 .../php/php/debian-php-fixheader.patch        |   6 +-
 meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
 .../php/php/xfail_two_bug_tests.patch         |  32 +++--
 .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
 6 files changed, 129 insertions(+), 51 deletions(-)
 rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf => 70_mod_php8.conf} (100%)
 rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb} (98%)
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +95 -18
index 1f3e683a0f..4278b1c61f 100644
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00 2001
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
 Subject: [PATCH] opcache/config.m4: enable opcache
 
 We can't use AC_TRY_RUN to run programs in a cross compile environment.
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
 Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
 fix issue linking with librt
 Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
 ---
- ext/opcache/config.m4 | 195 +-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257 ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
 diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index 6c40cafc1c..6569aa9e1c 100644
+index 5492fd92..ba55e9c4 100644
 --- a/ext/opcache/config.m4
 +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+ 
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
++      PHP_SUBST(OPCACHE_SHARED_LIBADD)
+     ])
+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-
+   fi
+ 
    AC_CHECK_FUNCS([mprotect])
  
    AC_MSG_CHECKING(for sysvipc shared memory support)
@@ -96,8 +161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
 -}
 -]])],[dnl
 -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
 +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
  
    AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
 -#ifndef MAP_FAILED
 -# define MAP_FAILED ((void*)-1)
 -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
- 
+-
 -int main() {
 -  pid_t pid;
 -  int status;
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
 -}
 -]])],[dnl
 -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-    have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_anon=no])
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+ 
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
    AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
 -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
 -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
 -]])],[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)])
 -  ],[
 -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
  
    PHP_NEW_EXTENSION(opcache,
  	ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+ 
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
+-    AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
 -- 
 2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
index a4804d1849..ed578d5e99 100644
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
 index 2a474ba36d..6d22a21630 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
  
 -UNAME=`uname -a | xargs`
 +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +6 -20
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
 update patch to version 7.4.4
 Signed-off-by: Changqing Li <[email protected]>
 ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/build/php.m4 b/build/php.m4
-index 7392876..5c45d13 100644
+index 93551d9c..dba50825 100644
 --- a/build/php.m4
 +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
  
    dnl Check libc first if no path is provided in --with-iconv.
 -  if test "$PHP_ICONV" = "yes"; then
@@ -23,19 +22,6 @@ index 7392876..5c45d13 100644
      dnl Reset LIBS temporarily as it may have already been included -liconv in.
      LIBS_save="$LIBS"
      LIBS=
-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
- 
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
 -- 
-2.7.4
+2.25.1
 
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +23 -9
index 21057439c9..5c4fab3e55 100644
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
 If and when these tests are modified to expect the correct output, they will
 succeed and generate warnings in the test summary.  This patch can then be removed.
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
 Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
 --- a/tests/basic/bug71273.phpt
 +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
- 	var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini leads to crash
+ 
+     var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
  ?>
- ==DONE==
 +--XFAIL--
 +Output is int(0), not int(1)
  --EXPECT--
  int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt b/tests/run-test/bug75042-3.phpt
+index 5a30143b..1ca1055a 100644
 --- a/tests/run-test/bug75042-3.phpt
 +++ b/tests/run-test/bug75042-3.phpt
-@@ -8,5 +8,8 @@ display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
  --FILE--
  <?php
-+?>
+ ?>
 +--XFAIL--
 +No warning message printed.
  --EXPECTF--
- PHP Warning:  PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+-- 
+2.17.1
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +2 -1
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
           "
 
 S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] = "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
+SRC_URI[sha256sum] = "70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"
 
 
 inherit autotools pkgconfig python3native gettext
@@ -52,6 +52,7 @@ COMMON_EXTRA_OECONF = "--enable-sockets \
                        --disable-rpath \
                        --with-pic \
                        --libdir=${PHP_LIBDIR} \
+                       --disable-opcache-jit \
 "
 EXTRA_OECONF = "--enable-mbstring \
                 --enable-fpm \
Signature · 1 line
2.25.1
#1 lore raw
Quoted 352 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after write).

     (cmb)
   . Fixed bug #73122 (Integer Overflow when concatenating strings). (cmb)
-GD:
   . Fixed bug #53580 (During resize gdImageCopyResampled cause colors change).
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths). (cmb) . Fixed bug #81400 (Unterminated string in dns_get_record() results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code). (cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword). (Remi) . Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113 +++++++++++++++---
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf => 70_mod_php8.conf} (100%) rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb} (98%)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +95 -18
index 1f3e683a0f..4278b1c61f 100644
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00 2001
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile environment.
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195 +-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257 ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index 6c40cafc1c..6569aa9e1c 100644
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
++      PHP_SUBST(OPCACHE_SHARED_LIBADD)
+     ])
+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support)
@@ -96,8 +161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
 
     AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-    have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_anon=no])
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[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)])
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
   	ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
+-    AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
index a4804d1849..ed578d5e99 100644
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
 
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +6 -20
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4
-index 7392876..5c45d13 100644
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then
@@ -23,19 +22,6 @@ index 7392876..5c45d13 100644
       dnl Reset LIBS temporarily as it may have already been included -liconv in.
       LIBS_save="$LIBS"
       LIBS=
-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1
 
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +23 -9
index 21057439c9..5c4fab3e55 100644
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then be removed.
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
- 	var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini leads to crash
+
+     var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt b/tests/run-test/bug75042-3.phpt
+index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt
-@@ -8,5 +8,8 @@ display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
   --FILE--
   <?php
-+?>
+ ?>
  +--XFAIL--
  +No warning message printed.
   --EXPECTF--
- PHP Warning:  PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+--
+2.17.1
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -1
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] = "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
+SRC_URI[sha256sum] = "70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"
 
 
  inherit autotools pkgconfig python3native gettext

meta-oe/recipes-devtools/php/php_8.0.11.bb COMMON_EXTRA_OECONF = "--enable-sockets \ · line 55

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
@@ -52,6 +52,7 @@ COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \
+                       --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 14 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -1
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#93419): https://lists.openembedded.org/g/openembedded-devel/message/93419
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

We have PHP 8 + JIT working locally, but I do not have time to put together a patch set right now. Other than cleaning up the existing patches to work with PHP 8, something like the attached is needed for JIT.

I may be able to put something together later in the week.

Quoted 353 lines · Khem Raj
Quoted 350 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after write).

     (cmb)
   . Fixed bug #73122 (Integer Overflow when concatenating strings). (cmb)
-GD:
   . Fixed bug #53580 (During resize gdImageCopyResampled cause colors change).
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths). (cmb) . Fixed bug #81400 (Unterminated string in dns_get_record() results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code). (cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword). (Remi) . Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113 +++++++++++++++---
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf => 70_mod_php8.conf} (100%) rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb} (98%)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +95 -18
index 1f3e683a0f..4278b1c61f 100644
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00 2001
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile environment.
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195 +-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257 ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index 6c40cafc1c..6569aa9e1c 100644
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
++      PHP_SUBST(OPCACHE_SHARED_LIBADD)
+     ])
+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support)
@@ -96,8 +161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
 
     AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-    have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_anon=no])
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[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)])
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
   	ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
+-    AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
index a4804d1849..ed578d5e99 100644
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
 
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +6 -20
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4
-index 7392876..5c45d13 100644
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then
@@ -23,19 +22,6 @@ index 7392876..5c45d13 100644
       dnl Reset LIBS temporarily as it may have already been included -liconv in.
       LIBS_save="$LIBS"
       LIBS=
-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1
 
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +23 -9
index 21057439c9..5c4fab3e55 100644
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then be removed.
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
- 	var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini leads to crash
+
+     var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt b/tests/run-test/bug75042-3.phpt
+index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt
-@@ -8,5 +8,8 @@ display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
   --FILE--
   <?php
-+?>
+ ?>
  +--XFAIL--
  +No warning message printed.
   --EXPECTF--
- PHP Warning:  PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+--
+2.17.1
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -1
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] = "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
+SRC_URI[sha256sum] = "70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"
 
 
Quoted 28 lines

meta-oe/recipes-devtools/php/php_8.0.11.bb COMMON_EXTRA_OECONF = "--enable-sockets \ · line 55

Quoted 6 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
  inherit autotools pkgconfig python3native gettext
@@ -52,6 +52,7 @@ COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \
+                       --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 18 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -1
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \
 
 
 
 
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#93421): https://lists.openembedded.org/g/openembedded-devel/message/93421
Mute This Topic: https://lists.openembedded.org/mt/86409155/4618432
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

ext/opcache/jit/Makefile.frag +2 -5
@@ -1,9 +1,6 @@
 
-$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
-	$(CC) $(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
+$(builddir)/jit/zend_jit_x86.c: $(srcdir)/jit/zend_jit_x86.dasc $(srcdir)/jit/dynasm/*.lua
+	@minilua $(srcdir)/jit/dynasm/dynasm.lua  $(DASM_FLAGS) -o $@ $(srcdir)/jit/zend_jit_x86.dasc
 
 $(builddir)/jit/zend_jit.lo: \
 	$(builddir)/jit/zend_jit_x86.c \
#3 lore raw
Quoted 6 lines · Claude Bing

We have PHP 8 + JIT working locally, but I do not have time to put together a patch set right now. Other than cleaning up the existing patches to work with PHP 8, something like the attached is needed for JIT.

I may be able to put something together later in the week.

Thanks, I will take you up on that offer

Quoted 386 lines · Khem Raj
Quoted 353 lines · wangmy
Quoted 350 lines

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after write).

     (cmb)
   . Fixed bug #73122 (Integer Overflow when concatenating strings). (cmb)
-GD:
   . Fixed bug #53580 (During resize gdImageCopyResampled cause colors change).
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths). (cmb) . Fixed bug #81400 (Unterminated string in dns_get_record() results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code). (cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword). (Remi) . Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113 +++++++++++++++---
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf => 70_mod_php8.conf} (100%) rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb} (98%)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +95 -18
index 1f3e683a0f..4278b1c61f 100644
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00 2001
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile environment.
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195 +-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257 ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index 6c40cafc1c..6569aa9e1c 100644
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
++      PHP_SUBST(OPCACHE_SHARED_LIBADD)
+     ])
+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent, $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support)
@@ -96,8 +161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
 
     AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-    have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_anon=no])
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[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)])
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
     ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
+-    AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
index a4804d1849..ed578d5e99 100644
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
 
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +6 -20
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4
-index 7392876..5c45d13 100644
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then
@@ -23,19 +22,6 @@ index 7392876..5c45d13 100644
       dnl Reset LIBS temporarily as it may have already been included -liconv in.
       LIBS_save="$LIBS"
       LIBS=
-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1
 
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +23 -9
index 21057439c9..5c4fab3e55 100644
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then be removed.
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-    var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini leads to crash
+
+     var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt b/tests/run-test/bug75042-3.phpt
+index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt
-@@ -8,5 +8,8 @@ display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
   --FILE--
   <?php
-+?>
+ ?>
  +--XFAIL--
  +No warning message printed.
   --EXPECTF--
- PHP Warning:  PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+--
+2.17.1
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -1
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] = "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
+SRC_URI[sha256sum] = "70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"
 
 
Quoted 22 lines

meta-oe/recipes-devtools/php/php_8.0.11.bb COMMON_EXTRA_OECONF = "--enable-sockets \ · line 55

Quoted 6 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
  inherit autotools pkgconfig python3native gettext
@@ -52,6 +52,7 @@ COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \
+                       --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 12 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93423): https://lists.openembedded.org/g/openembedded-devel/message/93423
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
In reply to Khem Raj
Quoted 8 lines
Quoted 5 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

$ cat tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

  --
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]
http://www.fujitsu.com/cn/fnst/

Quoted 445 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]>; [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 9 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths).

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

(Remi)

Quoted 6 lines

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +4 -2
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
   	ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or missing dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac b/configure.ac · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 26 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +1 -9
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then

be removed.

Quoted 60 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +16 -4
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
- 	var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 16 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#93419):
https://lists.openembedded.org/g/openembedded-devel/message/93419
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
Quoted 11 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected] <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

Quoted 479 lines
$ cat
tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]
http://www.fujitsu.com/cn/fnst/

Quoted 9 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]>; [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines
Quoted 3 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed).

(cmb)

Quoted 11 lines
Quoted 1 line

. Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 3 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound

closure).

Quoted 6 lines
Quoted 6 lines

(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative

paths).

Quoted 10 lines

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

Quoted 2 lines

(Remi)

Quoted 1 line

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of

destination).

Quoted 204 lines
Quoted 5 lines
     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +4 -2
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
    ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Quoted 2 lines

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or

missing

Quoted 66 lines

dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac b/configure.ac · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 13 lines

meta-oe/recipes-devtools/php/php/iconv.patch index 7392876..5c45d13 100644

Quoted 13 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +0 -6
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f

"$i/include/giconv.h"; then

Quoted 20 lines
Quoted 20 lines
meta-oe/recipes-devtools/php/php/iconv.patch +1 -3
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
Quoted 1 line

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch line 7

Quoted 1 line
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +0 -0
  If and when these tests are modified to expect the correct output,

they will

Quoted 1 line
Quoted 1 line

succeed and generate warnings in the test summary. This patch can

then

Quoted 12 lines

be removed.

Quoted 11 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +6 -0
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
Quoted 6 lines

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch Upstream-Status: Pending

Quoted 6 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +2 -2
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",

$out));

Quoted 78 lines
Quoted 43 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +8 -2
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 16 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#93419):
https://lists.openembedded.org/g/openembedded-devel/message/93419
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

btw. xdebug will need some patches to work with php 8 see
https://errors.yoctoproject.org/Errors/Details/613233/

Quoted 485 lines · Khem Raj
Quoted 11 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected] <[email protected]> wrote:
Quoted 9 lines
Quoted 6 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

Quoted 466 lines

$ cat tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]
http://www.fujitsu.com/cn/fnst/

Quoted 445 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]>; [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 9 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths).

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

(Remi)

Quoted 6 lines

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +4 -2
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
    ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or missing dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac b/configure.ac · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 26 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +1 -9
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then

be removed.

Quoted 60 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +16 -4
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 16 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#93419):
https://lists.openembedded.org/g/openembedded-devel/message/93419
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#7 lore raw

XDebug should just be upgraded to the latest version (we are on 3.0.4) to reslove those errors.

Quoted 491 lines · Khem Raj

btw. xdebug will need some patches to work with php 8 see
https://errors.yoctoproject.org/Errors/Details/613233/

Quoted 487 lines · Khem Raj
Quoted 11 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected] <[email protected]> wrote:
Quoted 9 lines
Quoted 6 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

Quoted 468 lines

$ cat tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]
http://www.fujitsu.com/cn/fnst/

Quoted 447 lines

-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]>; [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 9 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths).

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

(Remi)

Quoted 6 lines

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb => php_8.0.11.bb}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb => php_8.0.11.bb}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +4 -2
-From: Claude Bing <[email protected]>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
    ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or missing dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac b/configure.ac · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac b/configure.ac
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac
  +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 26 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +1 -9
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then

be removed.

Quoted 60 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +16 -4
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 18 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93452): https://lists.openembedded.org/g/openembedded-devel/message/93452
Mute This Topic: https://lists.openembedded.org/mt/86409155/4618432
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw
In reply to Khem Raj
Quoted 3 lines

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

Got it, I’ll try to build minilua by php-native.

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

From: Khem Raj <[email protected]>
Sent: Tuesday, October 19, 2021 11:23 AM
To: Wang, Mingyu/王 鸣瑜 <[email protected]>
Cc: [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 8 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected]<mailto:[email protected]>…
Quoted 5 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

$ cat tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

Quoted 445 lines

-----Original Message-----
From: Khem Raj <[email protected]<mailto:[email protected]>>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 9 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths).

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

(Remi)

Quoted 6 lines

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb<http://php_7.4.21.bb> => php_8.0.11.bb<http://php_8.0.11.bb>}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb<http://php_7.4.21.bb> => php_8.0.11.bb<http://php_8.0.11.bb>}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

Review

Quoted 9 lines
(quoted diff) +4 -2
-From: Claude Bing <[email protected]<mailto:[email protected]>>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]<mailto:[email protected]>>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]<mailto:[email protected]>>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]<mailto:[email protected]>>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]<mailto:[email protected]>>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]<mailto:[email protected]>>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
    ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or missing dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac<http://configure.ac> b/configure.ac<http://configure.ac> · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac<http://configure.ac> b/configure.ac<http://configure.ac>
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac<http://configure.ac>
  +++ b/configure.ac<http://configure.ac>
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]<mailto:[email protected]>>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 26 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +1 -9
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]<mailto:[email protected]>>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then

be removed.

Quoted 60 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +16 -4
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]<mailto:[email protected]>>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]<mailto:[email protected]>>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb>
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb>
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 16 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93419):
https://lists.openembedded.org/g/openembedded-devel/message/93419
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]<mailto:openembedded-devel%[email protected]>
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]<mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

#9 lore raw
In reply to Khem Raj

We try to enable opcache from native sysroot, php can be compiled.

But the following problems occured in the x86_64 environment:

opcache/jit/zend_jit_x86.dasc:2136:43: error:'znode_op' {aka'union _znode_op'} has no member named'zv'

After investigation, we know that 32bit support is not perfect enough by opcache, please see the following source for details:

Zend/zend_compile.h:

52 /* On 64-bit systems less optimal, but more compact VM code leads to better

53 * performance. So on 32-bit systems we use absolute addresses for jump

54 * targets and constants, but on 64-bit systems relative 32-bit offsets */

55 #if SIZEOF_SIZE_T == 4

56 # define ZEND_USE_ABS_JMP_ADDR 1

57 # define ZEND_USE_ABS_CONST_ADDR 1

58 #else

59 # define ZEND_USE_ABS_JMP_ADDR 0

60 # define ZEND_USE_ABS_CONST_ADDR 0

61 #endif

62

  63 typedef union _znode_op {

.......

72 #endif

73 #if ZEND_USE_ABS_CONST_ADDR

74 zval *zv;

75 #endif

76} znode_op;

We suggest to disable opcache temporarily, and then enable it after the upstream has better support for 64bit.

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

From: Khem Raj <[email protected]>
Sent: Tuesday, October 19, 2021 11:23 AM
To: Wang, Mingyu/王 鸣瑜 <[email protected]>
Cc: [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 8 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected]<mailto:[email protected]>…
Quoted 5 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

$ cat tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

Quoted 445 lines

-----Original Message-----
From: Khem Raj <[email protected]<mailto:[email protected]>>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 9 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths).

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

(Remi)

Quoted 6 lines

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb<http://php_7.4.21.bb> => php_8.0.11.bb<http://php_8.0.11.bb>}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb<http://php_7.4.21.bb> => php_8.0.11.bb<http://php_8.0.11.bb>}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

Review

Quoted 9 lines
(quoted diff) +4 -2
-From: Claude Bing <[email protected]<mailto:[email protected]>>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]<mailto:[email protected]>>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]<mailto:[email protected]>>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]<mailto:[email protected]>>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]<mailto:[email protected]>>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]<mailto:[email protected]>>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
    ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or missing dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac<http://configure.ac> b/configure.ac<http://configure.ac> · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac<http://configure.ac> b/configure.ac<http://configure.ac>
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac<http://configure.ac>
  +++ b/configure.ac<http://configure.ac>
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]<mailto:[email protected]>>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 26 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +1 -9
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]<mailto:[email protected]>>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then

be removed.

Quoted 60 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +16 -4
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]<mailto:[email protected]>>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]<mailto:[email protected]>>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb>
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb>
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 16 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93419):
https://lists.openembedded.org/g/openembedded-devel/message/93419
Mute This Topic: https://lists.openembedded.org/mt/86409155/1997914
Group Owner: [email protected]<mailto:openembedded-devel%[email protected]>
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]<mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

Because we need to use a new version of php, so I want to ask if there are any other comments?
If not, can this patch be accepted?

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

From: [email protected] <[email protected]> On Behalf Of wangmy
Sent: Wednesday, October 20, 2021 4:42 PM
To: Khem Raj <[email protected]>
Cc: [email protected]
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

We try to enable opcache from native sysroot, php can be compiled.

But the following problems occured in the x86_64 environment:

opcache/jit/zend_jit_x86.dasc:2136:43: error:'znode_op' {aka'union _znode_op'} has no member named'zv'

After investigation, we know that 32bit support is not perfect enough by opcache, please see the following source for details:

Zend/zend_compile.h:

52 /* On 64-bit systems less optimal, but more compact VM code leads to better

53 * performance. So on 32-bit systems we use absolute addresses for jump

54 * targets and constants, but on 64-bit systems relative 32-bit offsets */

55 #if SIZEOF_SIZE_T == 4

56 # define ZEND_USE_ABS_JMP_ADDR 1

57 # define ZEND_USE_ABS_CONST_ADDR 1

58 #else

59 # define ZEND_USE_ABS_JMP_ADDR 0

60 # define ZEND_USE_ABS_CONST_ADDR 0

61 #endif

62

  63 typedef union _znode_op {

.......

72 #endif

73 #if ZEND_USE_ABS_CONST_ADDR

74 zval *zv;

75 #endif

76} znode_op;

We suggest to disable opcache temporarily, and then enable it after the upstream has better support for 64bit.

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

From: Khem Raj <[email protected]<mailto:[email protected]>>
Sent: Tuesday, October 19, 2021 11:23 AM
To: Wang, Mingyu/王 鸣瑜 <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 8 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected]<mailto:[email protected]>…
Quoted 5 lines
COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

$ cat tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
$(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
        $(CC) $(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 ...

--
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]<mailto:[email protected]>
http://www.fujitsu.com/cn/fnst/

Quoted 437 lines

-----Original Message-----
From: Khem Raj <[email protected]<mailto:[email protected]>>
Sent: Monday, October 18, 2021 9:58 PM
To: Wang, Mingyu/王 鸣瑜 <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 4 lines · wangmy

23 Sep 2021, PHP 8.0.11
- Core:
. Fixed bug #81302 (Stream position after stream filter removed). (cmb) . Fixed bug #81346 (Non-seekable streams don't update position after

write).

Quoted 5 lines
     (cmb)

. Fixed bug #73122 (Integer Overflow when concatenating strings).
(cmb)
-GD:
. Fixed bug #53580 (During resize gdImageCopyResampled cause colors

change).

Quoted 9 lines
     (cmb)

- Opcache:
. Fixed bug #81353 (segfault with preloading and statically bound closure).
(Nikita)
- Shmop:
. Fixed bug #81407 (shmop_open won't attach and causes php to
crash). (cmb)
- Standard:
. Fixed bug #71542 (disk_total_space does not work with relative paths).

(cmb)

Quoted 9 lines

. Fixed bug #81400 (Unterminated string in dns_get_record()
results). (cmb)
- SysVMsg:
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
- XML:
. Fixed bug #81351 (xml_parse may fail, but has no error code).
(cmb, Nikita)
- Zip:
. Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).

(Remi)

Quoted 6 lines

. Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).

     (cmb)
---
  ...001-opcache-config.m4-enable-opcache.patch | 113

+++++++++++++++---

Quoted 7 lines
  .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
  .../php/php/debian-php-fixheader.patch        |   6 +-
  meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
  .../php/php/xfail_two_bug_tests.patch         |  32 +++--
  .../php/{php_7.4.21.bb<http://php_7.4.21.bb> => php_8.0.11.bb<http://php_8.0.11.bb>}      |   3 +-
  6 files changed, 129 insertions(+), 51 deletions(-)

rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>

70_mod_php8.conf} (100%)

Quoted 17 lines

rename meta-oe/recipes-devtools/php/{php_7.4.21.bb<http://php_7.4.21.bb> => php_8.0.11.bb<http://php_8.0.11.bb>}
(98%)

diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
index 1f3e683a0f..4278b1c61f 100644
---
a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac he.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o +++ pcache.patch

(quoted diff) +0 -1
@@ -1,6 +1,6 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00

2001

Review

Quoted 9 lines
(quoted diff) +4 -2
-From: Claude Bing <[email protected]<mailto:[email protected]>>
-Date: Fri, 8 May 2020 10:15:32 -0400
+From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]<mailto:[email protected]>>
+Date: Tue, 12 Oct 2021 06:17:29 +0000
  Subject: [PATCH] opcache/config.m4: enable opcache
 
  We can't use AC_TRY_RUN to run programs in a cross compile

environment.

Quoted 36 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +8 -5
@@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
 
  Signed-off-by: Anuj Mittal <[email protected]<mailto:[email protected]>>
 
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <[email protected]<mailto:[email protected]>>
-
  fix issue linking with librt
  Signed-off-by: Claude Bing <[email protected]<mailto:[email protected]>>
+
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]<mailto:[email protected]>>
+---
  ---
- ext/opcache/config.m4 | 195
+-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 257
+ ++----------------------------------------
+ 1 file changed, 10 insertions(+), 247 deletions(-)
 
  diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index

6c40cafc1c..6569aa9e1c 100644

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -1
+index 5492fd92..ba55e9c4 100644
  --- a/ext/opcache/config.m4
  +++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
+     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
+
+     dnl Find out which ABI we are using.
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-      int main(void) {
+-        return sizeof(void*) == 4;
+-      }
+-    ]])],[

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch Upstream-Status: Inappropriate [Configuration]

Quoted 10 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +10 -0
+-      ac_cv_32bit_build=no
+-    ],[
+-      ac_cv_32bit_build=yes
+-    ],[
+-      ac_cv_32bit_build=no
++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
++    [
++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
++      PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 28 lines

++ PHP_SUBST(OPCACHE_SHARED_LIBADD)
+ ])

+-
+-    if test "$ac_cv_32bit_build" = "no"; then
+-      case $host_alias in
+-        *x86_64-*-darwin*)
+-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
+-        ;;
+-        *x86_64*)
+-          DASM_FLAGS="-D X64=1"
+-        ;;
+-      esac
+-    fi
+-
+-    if test "$PHP_THREAD_SAFETY" = "yes"; then
+-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
+-    fi
+-
+-    PHP_SUBST(DASM_FLAGS)
+-
+-    AC_MSG_CHECKING(for opagent in default path)
+-    for i in /usr/local /usr; do
+-      if test -r $i/include/opagent.h; then
+-        OPAGENT_DIR=$i
+-        AC_MSG_RESULT(found in $i)
+-        break
+-      fi
+-    done
Quoted 8 lines
+-    if test -z "$OPAGENT_DIR"; then
+-      AC_MSG_RESULT(not found)
+-    else
+-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
+-      [
+-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
+-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
+-        PHP_ADD_LIBRARY_WITH_PATH(opagent,

$OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)

Quoted 8 lines
+-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
+-      ],[
+-        AC_MSG_RESULT(not found)
+-      ],[
+-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
+-      ])
+-    fi
+-

Review

Quoted 9 lines
(quoted diff) +3 -0
+   fi
+
     AC_CHECK_FUNCS([mprotect])
 
     AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
+161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

Quoted 8 lines

-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])

+-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+-  AC_MSG_RESULT([$have_shm_ipc])
  +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM

support])

AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory

support)

Quoted 12 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -3
@@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -#ifndef MAP_FAILED
  -# define MAP_FAILED ((void*)-1)
  -#endif
-+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
-+ mmap(MAP_ANON) SHM support])
-
+-
  -int main() {
  -  pid_t pid;
  -  int status;

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 216

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
@@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
  -}
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have

mmap(MAP_ANON) SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -4
--    msg=yes],[msg=no],[msg=no])
--  AC_MSG_RESULT([$msg])
--
--  PHP_CHECK_FUNC_LIB(shm_open, rt)
+-

have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a non=no])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 6 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  AC_MSG_RESULT([$have_shm_mmap_anon])
++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
++ mmap(MAP_ANON) SHM support])
+
+   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
     AC_MSG_CHECKING(for mmap() using shm_open() shared memory

support)

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 287

Quoted 5 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +0 -0
  -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  -#include <sys/types.h>
@@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
  -]])],[dnl
  -    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX

mmap() SHM support])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644

Quoted 3 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +1 -0
  -    AC_MSG_RESULT([yes])
+-    have_shm_mmap_posix=yes
  -    PHP_CHECK_LIBRARY(rt, shm_unlink,

[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 6c40cafc1c..6569aa9e1c 100644 · line 305

Quoted 11 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
  -  ],[
  -    AC_MSG_RESULT([no])
@@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
 
     PHP_NEW_EXTENSION(opcache,
    ZendAccelerator.c \
+@@ -339,10 +106,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=

"yes" && test "$have_shm_mmap_anon" != "yes"; then

Review index 6c40cafc1c..6569aa9e1c 100644 · line 306

Quoted 1 line
(quoted diff) +1 -0
+-    AC_MSG_ERROR([No supported shared memory caching support was

found when configuring opcache. Check config.log for any errors or missing dependencies.])

Quoted 20 lines
meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +5 -0
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
  --
  2.17.1
 
meta-oe/recipes-devtools/php/php/70_mod_php8.conf renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf +0 -0
similarity index 100%
rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf

diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch index a4804d1849..ed578d5e99 100644

meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch diff --git a/configure.ac<http://configure.ac> b/configure.ac<http://configure.ac> · line 24

Quoted 10 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +3 -3
@@ -18,9 +18,9 @@ diff --git a/configure.ac<http://configure.ac> b/configure.ac<http://configure.ac>
  index 2a474ba36d..6d22a21630 100644
  --- a/configure.ac<http://configure.ac>
  +++ b/configure.ac<http://configure.ac>
-@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
 date])
+@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
+EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM

$PHP_LDFLAGS"

meta-oe/recipes-devtools/php/php/iconv.patch Subject: [PATCH] From

Quoted 9 lines
meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch +0 -0
  -UNAME=`uname -a | xargs`
  +UNAME=`uname | xargs`
meta-oe/recipes-devtools/php/php/iconv.patch +0 -0
index 9ec8a89b57..9b2d85951c 100644
@@ -5,16 +5,15 @@ Subject: [PATCH] From

17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17

Quoted 21 lines
meta-oe/recipes-devtools/php/php/iconv.patch +2 -3
  update patch to version 7.4.4
  Signed-off-by: Changqing Li <[email protected]<mailto:[email protected]>>
  ---
- build/php.m4        | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13

100644

meta-oe/recipes-devtools/php/php/iconv.patch +3 -2
+index 93551d9c..dba50825 100644
  --- a/build/php.m4
  +++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
-   echo > ext/iconv/php_iconv_supports_errno.h
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   unset ICONV_DIR
 
     dnl Check libc first if no path is provided in --with-iconv.
  -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
Quoted 2 lines

7392876..5c45d13 100644
dnl Reset LIBS temporarily as it may have already been included

-liconv in.

Quoted 26 lines
       LIBS_save="$LIBS"
       LIBS=

-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then

meta-oe/recipes-devtools/php/php/iconv.patch +1 -9
-
-   if test "$iconv_avail" != "no"; then
-     if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
-+      for i in $PHP_ICONV /usr/local /usr; do
-         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
-           PHP_ICONV_PREFIX="$i"
-           break
  --
-2.7.4
+2.25.1

diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch index 21057439c9..5c4fab3e55 100644

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch

Quoted 9 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +5 -1
@@ -1,4 +1,7 @@
-php-ptest: xfail two tests
+From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
+2001
+From: Lei Maohui <[email protected]<mailto:[email protected]>>
+Date: Tue, 12 Oct 2021 02:11:10 +0000
+Subject: [PATCH] php-ptest: xfail two tests
 
  If and when these tests are modified to expect the correct output, they will
  succeed and generate warnings in the test summary.  This patch can then

be removed.

Quoted 60 lines
meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +16 -4
@@ -9,26 +12,37 @@ Upstream-Status: Pending
 
  Signed-off-By: Joe Slater <[email protected]<mailto:[email protected]>>
 
+update patch to version 8.0.10
+Signed-off-by: Lei Maohui <[email protected]<mailto:[email protected]>>
+---
+ tests/basic/bug71273.phpt      | 2 ++
+ tests/run-test/bug75042-3.phpt | 2 ++
+ 2 files changed, 4 insertions(+)
 
+diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
+index 7634d432..50451d7b 100644
  --- a/tests/basic/bug71273.phpt
  +++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
-   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
+leads to crash
+
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
+ $out));
   ?>
- ==DONE==
  +--XFAIL--
  +Output is int(0), not int(1)
   --EXPECT--
   int(1)
- ==DONE==
+diff --git a/tests/run-test/bug75042-3.phpt
+b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
  --- a/tests/run-test/bug75042-3.phpt
  +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@

display_errors=1
- nonexistentsharedmodule
+@@ -9,5 +9,7 @@ nonexistentsharedmodule
--FILE--
<?php
-+?>
+ ?>
+--XFAIL--
+No warning message printed.
--EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
+ Warning: PHP Startup: Unable to load dynamic library +'%snonexistentsharedmodule.%s' %A
+--
+2.17.1

meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch +1 -0
+
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -0
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb>
rename to meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb>
index 916010a6ff..a8a2699cdb 100644

meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> SRC_URI:append:class-target = " \ · line 36

Quoted 4 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -1
@@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
            "
 
  S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] =

"36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"

meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> SRC_URI:append:class-target = " \ · line 36

Quoted 1 line
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +1 -0
+SRC_URI[sha256sum] =

"70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"

Quoted 8 lines
meta-oe/recipes-devtools/php/php_8.0.11.bb<http://php_8.0.11.bb> renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb<http://php_7.4.21.bb> +0 -0
  inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
 COMMON_EXTRA_OECONF = "--enable-sockets \
                         --disable-rpath \
                         --with-pic \
                         --libdir=${PHP_LIBDIR} \

+ --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

Quoted 8 lines
  "
  EXTRA_OECONF = "--enable-mbstring \
                  --enable-fpm \
#12 lore raw

I'm sorry I have not had time to work on this yet. If the JIT has issues with 32-bit architectures, could we just disable JIT for those platforms? It does not make sense to disable Opcache, since it has historically worked OK for everything.

Our solution, which has not yet been provided here, does not account for 32-bit since we exclusively use 64-bit.

Quoted 642 lines · wangmy

Because we need to use a new version of php, so I want to ask

if there are any other comments?

If not, can this patch be accepted?

  --

Best Regards

---------------------------------------------------

Wang Mingyu

Development Dept.I

Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China

TEL: +86+25-86630566-8568

COINS: 79988548

FAX: +86+25-83317685

MAIL: [email protected] <mailto:[email protected]>

http://www.fujitsu.com/cn/fnst/ <http://www.fujitsu.com/cn/fnst/>

*From:*[email protected] <[email protected]> *On Behalf Of *wangmy *Sent:* Wednesday, October 20, 2021 4:42 PM
*To:* Khem Raj <[email protected]>
*Cc:* [email protected] *Subject:* Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

We try to enable opcache from native sysroot, php can be compiled.

But the following problems occured in the x86_64 environment:

opcache/jit/zend_jit_x86.dasc:2136:43: error:'znode_op' {aka'union _znode_op'} has no member named'zv'

After investigation, we know that 32bit support is not perfect enough by opcache, please see the following source for details:

Zend/zend_compile.h:

  52 /* On 64-bit systems less optimal, but more compact VM code leads to better

  53 * performance. So on 32-bit systems we use absolute addresses for jump

  54 * targets and constants, but on 64-bit systems relative 32-bit offsets */

  55 #if SIZEOF_SIZE_T == 4

  56 # define ZEND_USE_ABS_JMP_ADDR 1

  57 # define ZEND_USE_ABS_CONST_ADDR 1

  58 #else

  59 # define ZEND_USE_ABS_JMP_ADDR 0

  60 # define ZEND_USE_ABS_CONST_ADDR 0

  61 #endif

  62

  63 typedef union _znode_op {

.......

  72 #endif

  73 #if ZEND_USE_ABS_CONST_ADDR

  74 zval *zv;

  75 #endif

  76} znode_op;

We suggest to disable opcache temporarily, and then enable it after the upstream has better support for 64bit.

  --

Best Regards

---------------------------------------------------

Wang Mingyu

Development Dept.I

Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China

TEL: +86+25-86630566-8568

COINS: 79988548

FAX: +86+25-83317685

MAIL: [email protected] <mailto:[email protected]>

http://www.fujitsu.com/cn/fnst/ <http://www.fujitsu.com/cn/fnst/>

*From:*Khem Raj <[email protected] <mailto:[email protected]>> *Sent:* Tuesday, October 19, 2021 11:23 AM
*To:* Wang, Mingyu/王鸣瑜<[email protected] <mailto:[email protected]>> *Cc:* [email protected] <mailto:[email protected]> *Subject:* Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 8 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected] <mailto:[email protected]>…
Quoted 5 lines

COMMON_EXTRA_OECONF = "--enable-sockets \
                          --disable-rpath \
                          --with-pic \
                          --libdir=${PHP_LIBDIR} \
+                       --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

    $ cat
    tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
    $(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
            $(CC) $(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 ...

      --
    Best Regards
    ---------------------------------------------------
    Wang Mingyu
    Development Dept.I
    Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu
    Road, Nanjing, 210012, China
    TEL: +86+25-86630566-8568
    COINS: 79988548
    FAX: +86+25-83317685
    MAIL: [email protected] <mailto:[email protected]>
    http://www.fujitsu.com/cn/fnst/ <http://www.fujitsu.com/cn/fnst/>

    > -----Original Message-----
    > From: Khem Raj <[email protected] <mailto:[email protected]>>
    > Sent: Monday, October 18, 2021 9:58 PM
    > To: Wang, Mingyu/王 鸣瑜<[email protected] <mailto:[email protected]>>;
    > [email protected]
    <mailto:[email protected]>
    > Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11
    > 
    > 
    > 
    > On 10/18/21 02:01, wangmy wrote:
    > > 23 Sep 2021, PHP 8.0.11
    > > - Core:
    > >    . Fixed bug #81302 (Stream position after stream filter removed). (cmb)
    > >    . Fixed bug #81346 (Non-seekable streams don't update position after
    > write).
    > >      (cmb)
    > >    . Fixed bug #73122 (Integer Overflow when concatenating strings).
    > > (cmb)
    > > -GD:
    > >    . Fixed bug #53580 (During resize gdImageCopyResampled cause colors
    > change).
    > >      (cmb)
    > > - Opcache:
    > >    . Fixed bug #81353 (segfault with preloading and statically bound closure).
    > >      (Nikita)
    > > - Shmop:
    > >    . Fixed bug #81407 (shmop_open won't attach and causes php to
    > > crash). (cmb)
    > > - Standard:
    > >    . Fixed bug #71542 (disk_total_space does not work with relative paths).
    > (cmb)
    > >    . Fixed bug #81400 (Unterminated string in dns_get_record()
    > > results). (cmb)
    > > - SysVMsg:
    > >    . Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
    > > - XML:
    > >    . Fixed bug #81351 (xml_parse may fail, but has no error code).
    > > (cmb, Nikita)
    > > - Zip:
    > >    . Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).
    > (Remi)
    > >    . Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).
    > >      (cmb)
    > >
    > > Signed-off-by: Wang Mingyu <[email protected] <mailto:[email protected]>>
    > > ---
    > >   ...001-opcache-config.m4-enable-opcache.patch | 113
    > +++++++++++++++---
    > >   .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
    > >   .../php/php/debian-php-fixheader.patch        |   6 +-
    > >   meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
    > >   .../php/php/xfail_two_bug_tests.patch         |  32 +++--
    > >   .../php/{php_7.4.21.bb <http://php_7.4.21.bb> => php_8.0.11.bb
    <http://php_8.0.11.bb>}      |   3 +-
    > >   6 files changed, 129 insertions(+), 51 deletions(-)
    > >   rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>
    > 70_mod_php8.conf} (100%)
    > >   rename meta-oe/recipes-devtools/php/{php_7.4.21.bb <http://php_7.4.21.bb> => php_8.0.11.bb
    <http://php_8.0.11.bb>}
    > > (98%)
    > >
    > > diff --git
    > > a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac
    > > he.patch
    > > b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac
    > > he.patch
    > > index 1f3e683a0f..4278b1c61f 100644
    > > ---
    > > a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac
    > > he.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o
    > > +++ pcache.patch
    > > @@ -1,6 +1,6 @@
    > > -From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00
    > > 2001
    > > -From: Claude Bing <[email protected] <mailto:[email protected]>>
    > > -Date: Fri, 8 May 2020 10:15:32 -0400
    > > +From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
    > > +2001
    > > +From: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +Date: Tue, 12 Oct 2021 06:17:29 +0000
    > >   Subject: [PATCH] opcache/config.m4: enable opcache
    > >
    > >   We can't use AC_TRY_RUN to run programs in a cross compile
    > environment.
    > > @@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
    > >
    > >   Signed-off-by: Anuj Mittal <[email protected] <mailto:[email protected]>>
    > >
    > > -update patch to version 7.4.4
    > > -Signed-off-by: Changqing Li <[email protected] <mailto:[email protected]>>
    > > -
    > >   fix issue linking with librt
    > >   Signed-off-by: Claude Bing <[email protected] <mailto:[email protected]>>
    > > +
    > > +update patch to version 8.0.10
    > > +Signed-off-by: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +---
    > >   ---
    > > - ext/opcache/config.m4 | 195
    > > +-----------------------------------------
    > > - 1 file changed, 4 insertions(+), 191 deletions(-)
    > > + ext/opcache/config.m4 | 257
    > > + ++----------------------------------------
    > > + 1 file changed, 10 insertions(+), 247 deletions(-)
    > >
    > >   diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index
    > > 6c40cafc1c..6569aa9e1c 100644
    > > +index 5492fd92..ba55e9c4 100644
    > >   --- a/ext/opcache/config.m4
    > >   +++ b/ext/opcache/config.m4
    > > -@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
    > > +@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
    > > +     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
    > > +
    > > +     dnl Find out which ABI we are using.
    > > +-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
    > > +-      int main(void) {
    > > +-        return sizeof(void*) == 4;
    > > +-      }
    > > +-    ]])],[
    > > +-      ac_cv_32bit_build=no
    > > +-    ],[
    > > +-      ac_cv_32bit_build=yes
    > > +-    ],[
    > > +-      ac_cv_32bit_build=no
    > > ++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
    > > ++    [
    > > ++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
    > > ++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
    > > ++      PHP_ADD_LIBRARY_WITH_PATH(opagent,
    > $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
    > > ++      PHP_SUBST(OPCACHE_SHARED_LIBADD)
    > > +     ])
    > > +-
    > > +-    if test "$ac_cv_32bit_build" = "no"; then
    > > +-      case $host_alias in
    > > +-        *x86_64-*-darwin*)
    > > +-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
    > > +-        ;;
    > > +-        *x86_64*)
    > > +-          DASM_FLAGS="-D X64=1"
    > > +-        ;;
    > > +-      esac
    > > +-    fi
    > > +-
    > > +-    if test "$PHP_THREAD_SAFETY" = "yes"; then
    > > +-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
    > > +-    fi
    > > +-
    > > +-    PHP_SUBST(DASM_FLAGS)
    > > +-
    > > +-    AC_MSG_CHECKING(for opagent in default path)
    > > +-    for i in /usr/local /usr; do
    > > +-      if test -r $i/include/opagent.h; then
    > > +-        OPAGENT_DIR=$i
    > > +-        AC_MSG_RESULT(found in $i)
    > > +-        break
    > > +-      fi
    > > +-    done
    > > +-    if test -z "$OPAGENT_DIR"; then
    > > +-      AC_MSG_RESULT(not found)
    > > +-    else
    > > +-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
    > > +-      [
    > > +-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
    > > +-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
    > > +-        PHP_ADD_LIBRARY_WITH_PATH(opagent,
    > $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
    > > +-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
    > > +-      ],[
    > > +-        AC_MSG_RESULT(not found)
    > > +-      ],[
    > > +-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
    > > +-      ])
    > > +-    fi
    > > +-
    > > +   fi
    > > +
    > >      AC_CHECK_FUNCS([mprotect])
    > >
    > >      AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
    > > +161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -}
    > >   -]])],[dnl
    > >   -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM
    > support])
    > > --    msg=yes],[msg=no],[msg=no])
    > > --  AC_MSG_RESULT([$msg])
    > > +-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
    > > +-  AC_MSG_RESULT([$have_shm_ipc])
    > >   +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM
    > > support])
    > >
    > >      AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory
    > support)
    > > @@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -#ifndef MAP_FAILED
    > >   -# define MAP_FAILED ((void*)-1)
    > >   -#endif
    > > -+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
    > > -+ mmap(MAP_ANON) SHM support])
    > > -
    > > +-
    > >   -int main() {
    > >   -  pid_t pid;
    > >   -  int status;
    > > @@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -}
    > >   -]])],[dnl
    > >   -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
    > mmap(MAP_ANON) SHM support])
    > > --    msg=yes],[msg=no],[msg=no])
    > > --  AC_MSG_RESULT([$msg])
    > > --
    > > --  PHP_CHECK_FUNC_LIB(shm_open, rt)
    > > +-
    > have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a
    > non=no])
    > > +-  AC_MSG_RESULT([$have_shm_mmap_anon])
    > > ++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
    > > ++ mmap(MAP_ANON) SHM support])
    > > +
    > > +   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
    > >      AC_MSG_CHECKING(for mmap() using shm_open() shared memory
    > support)
    > >   -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
    > >   -#include <sys/types.h>
    > > @@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -]])],[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)])
    > >   -  ],[
    > >   -    AC_MSG_RESULT([no])
    > > @@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >
    > >      PHP_NEW_EXTENSION(opcache,
    > >     ZendAccelerator.c \
    > > +@@ -339,10 +106,6 @@ int main() {
    > > +   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
    > > +   PHP_ADD_EXTENSION_DEP(opcache, pcre)
    > > +
    > > +-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=
    > "yes" && test "$have_shm_mmap_anon" != "yes"; then
    > > +-    AC_MSG_ERROR([No supported shared memory caching support was
    > found when configuring opcache. Check config.log for any errors or missing
    > dependencies.])
    > > +-  fi
    > > +-
    > > +   if test "$PHP_OPCACHE_JIT" = "yes"; then
    > > +     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
    > > +     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
    > >   --
    > >   2.17.1
    > >
    > > diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf
    > > b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf
    > > similarity index 100%
    > > rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
    > > rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf
    > > diff --git
    > > a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > index a4804d1849..ed578d5e99 100644
    > > --- a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > @@ -18,9 +18,9 @@ diff --git a/configure.ac <http://configure.ac> b/configure.ac <http://configure.ac>
    > >   index 2a474ba36d..6d22a21630 100644
    > >   --- a/configure.ac <http://configure.ac>
    > >   +++ b/configure.ac <http://configure.ac>
    > > -@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
    > > - fi
    > > - AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
    > > date])
    > > +@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
    > > +EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
    > > + EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM
    > $PHP_LDFLAGS"
    > >
    > >   -UNAME=`uname -a | xargs`
    > >   +UNAME=`uname | xargs`
    > > diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch
    > > b/meta-oe/recipes-devtools/php/php/iconv.patch
    > > index 9ec8a89b57..9b2d85951c 100644
    > > --- a/meta-oe/recipes-devtools/php/php/iconv.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/iconv.patch
    > > @@ -5,16 +5,15 @@ Subject: [PATCH] From
    > 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
    > >   update patch to version 7.4.4
    > >   Signed-off-by: Changqing Li <[email protected] <mailto:[email protected]>>
    > >   ---
    > > - build/php.m4        | 3 ++-
    > > - ext/iconv/config.m4 | 2 +-
    > > - 2 files changed, 3 insertions(+), 2 deletions(-)
    > > + build/php.m4 | 3 ++-
    > > + 1 file changed, 2 insertions(+), 1 deletion(-)
    > >
    > >   diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13
    > > 100644
    > > +index 93551d9c..dba50825 100644
    > >   --- a/build/php.m4
    > >   +++ b/build/php.m4
    > > -@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
    > > -   echo > ext/iconv/php_iconv_supports_errno.h
    > > +@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
    > > +   unset ICONV_DIR
    > >
    > >      dnl Check libc first if no path is provided in --with-iconv.
    > >   -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
    > > 7392876..5c45d13 100644
    > >        dnl Reset LIBS temporarily as it may have already been included
    > -liconv in.
    > >        LIBS_save="$LIBS"
    > >        LIBS=
    > > -diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index
    > > fe9b47a..b6b632f 100644
    > > ---- a/ext/iconv/config.m4
    > > -+++ b/ext/iconv/config.m4
    > > -@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
    > > -
    > > -   if test "$iconv_avail" != "no"; then
    > > -     if test -z "$ICONV_DIR"; then
    > > --      for i in /usr/local /usr; do
    > > -+      for i in $PHP_ICONV /usr/local /usr; do
    > > -         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
    > > -           PHP_ICONV_PREFIX="$i"
    > > -           break
    > >   --
    > > -2.7.4
    > > +2.25.1
    > >
    > > diff --git
    > > a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > index 21057439c9..5c4fab3e55 100644
    > > --- a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > @@ -1,4 +1,7 @@
    > > -php-ptest: xfail two tests
    > > +From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
    > > +2001
    > > +From: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +Date: Tue, 12 Oct 2021 02:11:10 +0000
    > > +Subject: [PATCH] php-ptest: xfail two tests
    > >
    > >   If and when these tests are modified to expect the correct output, they will
    > >   succeed and generate warnings in the test summary.  This patch can then
    > be removed.
    > > @@ -9,26 +12,37 @@ Upstream-Status: Pending
    > >
    > >   Signed-off-By: Joe Slater <[email protected] <mailto:[email protected]>>
    > >
    > > +update patch to version 8.0.10
    > > +Signed-off-by: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +---
    > > + tests/basic/bug71273.phpt      | 2 ++
    > > + tests/run-test/bug75042-3.phpt | 2 ++
    > > + 2 files changed, 4 insertions(+)
    > >
    > > +diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
    > > +index 7634d432..50451d7b 100644
    > >   --- a/tests/basic/bug71273.phpt
    > >   +++ b/tests/basic/bug71273.phpt
    > > -@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
    > > -   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
    > > +@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
    > > +leads to crash
    > > +
    > > +
    > > + var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
    > > + $out));
    > >    ?>
    > > - ==DONE==
    > >   +--XFAIL--
    > >   +Output is int(0), not int(1)
    > >    --EXPECT--
    > >    int(1)
    > > - ==DONE==
    > > +diff --git a/tests/run-test/bug75042-3.phpt
    > > +b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
    > >   --- a/tests/run-test/bug75042-3.phpt
    > >   +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@
    > > display_errors=1
    > > - nonexistentsharedmodule
    > > +@@ -9,5 +9,7 @@ nonexistentsharedmodule
    > >    --FILE--
    > >    <?php
    > > -+?>
    > > + ?>
    > >   +--XFAIL--
    > >   +No warning message printed.
    > >    --EXPECTF--
    > > - PHP Warning:  PHP Startup: Unable to load dynamic library
    > > '%snonexistentsharedmodule.%s' %A
    > > + Warning: PHP Startup: Unable to load dynamic library
    > > +'%snonexistentsharedmodule.%s' %A
    > > +--
    > > +2.17.1
    > > +
    > > diff --git a/meta-oe/recipes-devtools/php/php_7.4.21.bb <http://php_7.4.21.bb>
    > > b/meta-oe/recipes-devtools/php/php_8.0.11.bb <http://php_8.0.11.bb>
    > > similarity index 98%
    > > rename from meta-oe/recipes-devtools/php/php_7.4.21.bb <http://php_7.4.21.bb>
    > > rename to meta-oe/recipes-devtools/php/php_8.0.11.bb <http://php_8.0.11.bb>
    > > index 916010a6ff..a8a2699cdb 100644
    > > --- a/meta-oe/recipes-devtools/php/php_7.4.21.bb <http://php_7.4.21.bb>
    > > +++ b/meta-oe/recipes-devtools/php/php_8.0.11.bb <http://php_8.0.11.bb>
    > > @@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
    > >             "
    > >
    > >   S = "${WORKDIR}/php-${PV}"
    > > -SRC_URI[sha256sum] =
    > "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
    > > +SRC_URI[sha256sum] =
    > "70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"
    > >
    > >
    > >   inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
    > > COMMON_EXTRA_OECONF = "--enable-sockets \
    > >                          --disable-rpath \
    > >                          --with-pic \
    > >                          --libdir=${PHP_LIBDIR} \
    > > +                       --disable-opcache-jit \
    > 
    > why do we need to disable jit ? and what are its effects in terms of
    > performance ?
    > 
    > >   "
    > >   EXTRA_OECONF = "--enable-mbstring \
    > >                   --enable-fpm \
    > >
    > >
    > >
    > > 
    > >

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93642): https://lists.openembedded.org/g/openembedded-devel/message/93642
Mute This Topic: https://lists.openembedded.org/mt/86409155/4618432
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#13 lore raw
In reply to [email protected]

Wang,

The master branch has a new commit which may resolve this issue for you. Can you see if you have any problems compiling PHP with opcache + JIT?

https://github.com/openembedded/meta-openembedded/commit/265bab83c9acbfa97117103dd5c35bbd8a9814d6

Quoted 642 lines · wangmy

Because we need to use a new version of php, so I want to ask

if there are any other comments?

If not, can this patch be accepted?

  --

Best Regards

---------------------------------------------------

Wang Mingyu

Development Dept.I

Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China

TEL: +86+25-86630566-8568

COINS: 79988548

FAX: +86+25-83317685

MAIL: [email protected] <mailto:[email protected]>

http://www.fujitsu.com/cn/fnst/ <http://www.fujitsu.com/cn/fnst/>

*From:*[email protected] <[email protected]> *On Behalf Of *wangmy *Sent:* Wednesday, October 20, 2021 4:42 PM
*To:* Khem Raj <[email protected]>
*Cc:* [email protected] *Subject:* Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

We try to enable opcache from native sysroot, php can be compiled.

But the following problems occured in the x86_64 environment:

opcache/jit/zend_jit_x86.dasc:2136:43: error:'znode_op' {aka'union _znode_op'} has no member named'zv'

After investigation, we know that 32bit support is not perfect enough by opcache, please see the following source for details:

Zend/zend_compile.h:

  52 /* On 64-bit systems less optimal, but more compact VM code leads to better

  53 * performance. So on 32-bit systems we use absolute addresses for jump

  54 * targets and constants, but on 64-bit systems relative 32-bit offsets */

  55 #if SIZEOF_SIZE_T == 4

  56 # define ZEND_USE_ABS_JMP_ADDR 1

  57 # define ZEND_USE_ABS_CONST_ADDR 1

  58 #else

  59 # define ZEND_USE_ABS_JMP_ADDR 0

  60 # define ZEND_USE_ABS_CONST_ADDR 0

  61 #endif

  62

  63 typedef union _znode_op {

.......

  72 #endif

  73 #if ZEND_USE_ABS_CONST_ADDR

  74 zval *zv;

  75 #endif

  76} znode_op;

We suggest to disable opcache temporarily, and then enable it after the upstream has better support for 64bit.

  --

Best Regards

---------------------------------------------------

Wang Mingyu

Development Dept.I

Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China

TEL: +86+25-86630566-8568

COINS: 79988548

FAX: +86+25-83317685

MAIL: [email protected] <mailto:[email protected]>

http://www.fujitsu.com/cn/fnst/ <http://www.fujitsu.com/cn/fnst/>

*From:*Khem Raj <[email protected] <mailto:[email protected]>> *Sent:* Tuesday, October 19, 2021 11:23 AM
*To:* Wang, Mingyu/王鸣瑜<[email protected] <mailto:[email protected]>> *Cc:* [email protected] <mailto:[email protected]> *Subject:* Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11

Quoted 8 lines · On Mon, Oct 18, 2021 at 7:34 PM [email protected] <mailto:[email protected]>…
Quoted 5 lines

COMMON_EXTRA_OECONF = "--enable-sockets \
                          --disable-rpath \
                          --with-pic \
                          --libdir=${PHP_LIBDIR} \
+                       --disable-opcache-jit \

why do we need to disable jit ? and what are its effects in terms of performance ?

If enable opcache-jit, php will build a binary minilua and then execute it immediately. I think it is unsuited to a cross compile environment.

Maybe we can build minilua as part of php-native and use it during compiling php from native sysroot and other option is to execute it under qemu usermode

    $ cat
    tmp/work/i686-ubinux-linux/php/8.0.10-r0/php-8.0.10/ext/opcache/jit/Makefile.frag
    $(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
            $(CC) $(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 ...

      --
    Best Regards
    ---------------------------------------------------
    Wang Mingyu
    Development Dept.I
    Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu
    Road, Nanjing, 210012, China
    TEL: +86+25-86630566-8568
    COINS: 79988548
    FAX: +86+25-83317685
    MAIL: [email protected] <mailto:[email protected]>
    http://www.fujitsu.com/cn/fnst/ <http://www.fujitsu.com/cn/fnst/>

    > -----Original Message-----
    > From: Khem Raj <[email protected] <mailto:[email protected]>>
    > Sent: Monday, October 18, 2021 9:58 PM
    > To: Wang, Mingyu/王 鸣瑜<[email protected] <mailto:[email protected]>>;
    > [email protected]
    <mailto:[email protected]>
    > Subject: Re: [oe] [meta-oe] [PATCH] php: upgrade 7.4.21 -> 8.0.11
    > 
    > 
    > 
    > On 10/18/21 02:01, wangmy wrote:
    > > 23 Sep 2021, PHP 8.0.11
    > > - Core:
    > >    . Fixed bug #81302 (Stream position after stream filter removed). (cmb)
    > >    . Fixed bug #81346 (Non-seekable streams don't update position after
    > write).
    > >      (cmb)
    > >    . Fixed bug #73122 (Integer Overflow when concatenating strings).
    > > (cmb)
    > > -GD:
    > >    . Fixed bug #53580 (During resize gdImageCopyResampled cause colors
    > change).
    > >      (cmb)
    > > - Opcache:
    > >    . Fixed bug #81353 (segfault with preloading and statically bound closure).
    > >      (Nikita)
    > > - Shmop:
    > >    . Fixed bug #81407 (shmop_open won't attach and causes php to
    > > crash). (cmb)
    > > - Standard:
    > >    . Fixed bug #71542 (disk_total_space does not work with relative paths).
    > (cmb)
    > >    . Fixed bug #81400 (Unterminated string in dns_get_record()
    > > results). (cmb)
    > > - SysVMsg:
    > >    . Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
    > > - XML:
    > >    . Fixed bug #81351 (xml_parse may fail, but has no error code).
    > > (cmb, Nikita)
    > > - Zip:
    > >    . Fixed bug #80833 (ZipArchive::getStream doesn't use setPassword).
    > (Remi)
    > >    . Fixed bug #81420 (ZipArchive::extractTo extracts outside of destination).
    > >      (cmb)
    > >
    > > Signed-off-by: Wang Mingyu <[email protected] <mailto:[email protected]>>
    > > ---
    > >   ...001-opcache-config.m4-enable-opcache.patch | 113
    > +++++++++++++++---
    > >   .../{70_mod_php7.conf => 70_mod_php8.conf}    |   0
    > >   .../php/php/debian-php-fixheader.patch        |   6 +-
    > >   meta-oe/recipes-devtools/php/php/iconv.patch  |  26 +---
    > >   .../php/php/xfail_two_bug_tests.patch         |  32 +++--
    > >   .../php/{php_7.4.21.bb <http://php_7.4.21.bb> => php_8.0.11.bb
    <http://php_8.0.11.bb>}      |   3 +-
    > >   6 files changed, 129 insertions(+), 51 deletions(-)
    > >   rename meta-oe/recipes-devtools/php/php/{70_mod_php7.conf =>
    > 70_mod_php8.conf} (100%)
    > >   rename meta-oe/recipes-devtools/php/{php_7.4.21.bb <http://php_7.4.21.bb> => php_8.0.11.bb
    <http://php_8.0.11.bb>}
    > > (98%)
    > >
    > > diff --git
    > > a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac
    > > he.patch
    > > b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac
    > > he.patch
    > > index 1f3e683a0f..4278b1c61f 100644
    > > ---
    > > a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcac
    > > he.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-o
    > > +++ pcache.patch
    > > @@ -1,6 +1,6 @@
    > > -From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00
    > > 2001
    > > -From: Claude Bing <[email protected] <mailto:[email protected]>>
    > > -Date: Fri, 8 May 2020 10:15:32 -0400
    > > +From c42c7a1498aa9aeebc39d2c84e059d35cf51797a Mon Sep 17 00:00:00
    > > +2001
    > > +From: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +Date: Tue, 12 Oct 2021 06:17:29 +0000
    > >   Subject: [PATCH] opcache/config.m4: enable opcache
    > >
    > >   We can't use AC_TRY_RUN to run programs in a cross compile
    > environment.
    > > @@ -13,20 +13,85 @@ Upstream-Status: Inappropriate [Configuration]
    > >
    > >   Signed-off-by: Anuj Mittal <[email protected] <mailto:[email protected]>>
    > >
    > > -update patch to version 7.4.4
    > > -Signed-off-by: Changqing Li <[email protected] <mailto:[email protected]>>
    > > -
    > >   fix issue linking with librt
    > >   Signed-off-by: Claude Bing <[email protected] <mailto:[email protected]>>
    > > +
    > > +update patch to version 8.0.10
    > > +Signed-off-by: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +---
    > >   ---
    > > - ext/opcache/config.m4 | 195
    > > +-----------------------------------------
    > > - 1 file changed, 4 insertions(+), 191 deletions(-)
    > > + ext/opcache/config.m4 | 257
    > > + ++----------------------------------------
    > > + 1 file changed, 10 insertions(+), 247 deletions(-)
    > >
    > >   diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index
    > > 6c40cafc1c..6569aa9e1c 100644
    > > +index 5492fd92..ba55e9c4 100644
    > >   --- a/ext/opcache/config.m4
    > >   +++ b/ext/opcache/config.m4
    > > -@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
    > > +@@ -43,260 +43,27 @@ if test "$PHP_OPCACHE" != "no"; then
    > > +     ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c"
    > > +
    > > +     dnl Find out which ABI we are using.
    > > +-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
    > > +-      int main(void) {
    > > +-        return sizeof(void*) == 4;
    > > +-      }
    > > +-    ]])],[
    > > +-      ac_cv_32bit_build=no
    > > +-    ],[
    > > +-      ac_cv_32bit_build=yes
    > > +-    ],[
    > > +-      ac_cv_32bit_build=no
    > > ++    PHP_CHECK_LIBRARY(opagent, op_write_native_code,
    > > ++    [
    > > ++      AC_DEFINE(HAVE_OPROFILE,1,[ ])
    > > ++      PHP_ADD_INCLUDE($OPAGENT_DIR/include)
    > > ++      PHP_ADD_LIBRARY_WITH_PATH(opagent,
    > $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
    > > ++      PHP_SUBST(OPCACHE_SHARED_LIBADD)
    > > +     ])
    > > +-
    > > +-    if test "$ac_cv_32bit_build" = "no"; then
    > > +-      case $host_alias in
    > > +-        *x86_64-*-darwin*)
    > > +-          DASM_FLAGS="-D X64APPLE=1 -D X64=1"
    > > +-        ;;
    > > +-        *x86_64*)
    > > +-          DASM_FLAGS="-D X64=1"
    > > +-        ;;
    > > +-      esac
    > > +-    fi
    > > +-
    > > +-    if test "$PHP_THREAD_SAFETY" = "yes"; then
    > > +-      DASM_FLAGS="$DASM_FLAGS -D ZTS=1"
    > > +-    fi
    > > +-
    > > +-    PHP_SUBST(DASM_FLAGS)
    > > +-
    > > +-    AC_MSG_CHECKING(for opagent in default path)
    > > +-    for i in /usr/local /usr; do
    > > +-      if test -r $i/include/opagent.h; then
    > > +-        OPAGENT_DIR=$i
    > > +-        AC_MSG_RESULT(found in $i)
    > > +-        break
    > > +-      fi
    > > +-    done
    > > +-    if test -z "$OPAGENT_DIR"; then
    > > +-      AC_MSG_RESULT(not found)
    > > +-    else
    > > +-      PHP_CHECK_LIBRARY(opagent, op_write_native_code,
    > > +-      [
    > > +-        AC_DEFINE(HAVE_OPROFILE,1,[ ])
    > > +-        PHP_ADD_INCLUDE($OPAGENT_DIR/include)
    > > +-        PHP_ADD_LIBRARY_WITH_PATH(opagent,
    > $OPAGENT_DIR/$PHP_LIBDIR/oprofile, OPCACHE_SHARED_LIBADD)
    > > +-        PHP_SUBST(OPCACHE_SHARED_LIBADD)
    > > +-      ],[
    > > +-        AC_MSG_RESULT(not found)
    > > +-      ],[
    > > +-        -L$OPAGENT_DIR/$PHP_LIBDIR/oprofile
    > > +-      ])
    > > +-    fi
    > > +-
    > > +   fi
    > > +
    > >      AC_CHECK_FUNCS([mprotect])
    > >
    > >      AC_MSG_CHECKING(for sysvipc shared memory support) @@ -96,8
    > > +161,8 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -}
    > >   -]])],[dnl
    > >   -    AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM
    > support])
    > > --    msg=yes],[msg=no],[msg=no])
    > > --  AC_MSG_RESULT([$msg])
    > > +-    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
    > > +-  AC_MSG_RESULT([$have_shm_ipc])
    > >   +  AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM
    > > support])
    > >
    > >      AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory
    > support)
    > > @@ -116,8 +181,7 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -#ifndef MAP_FAILED
    > >   -# define MAP_FAILED ((void*)-1)
    > >   -#endif
    > > -+  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
    > > -+ mmap(MAP_ANON) SHM support])
    > > -
    > > +-
    > >   -int main() {
    > >   -  pid_t pid;
    > >   -  int status;
    > > @@ -150,10 +214,11 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -}
    > >   -]])],[dnl
    > >   -    AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
    > mmap(MAP_ANON) SHM support])
    > > --    msg=yes],[msg=no],[msg=no])
    > > --  AC_MSG_RESULT([$msg])
    > > --
    > > --  PHP_CHECK_FUNC_LIB(shm_open, rt)
    > > +-
    > have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_a
    > non=no])
    > > +-  AC_MSG_RESULT([$have_shm_mmap_anon])
    > > ++  AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have
    > > ++ mmap(MAP_ANON) SHM support])
    > > +
    > > +   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
    > >      AC_MSG_CHECKING(for mmap() using shm_open() shared memory
    > support)
    > >   -  AC_RUN_IFELSE([AC_LANG_SOURCE([[
    > >   -#include <sys/types.h>
    > > @@ -221,6 +286,7 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >   -]])],[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)])
    > >   -  ],[
    > >   -    AC_MSG_RESULT([no])
    > > @@ -232,6 +298,17 @@ index 6c40cafc1c..6569aa9e1c 100644
    > >
    > >      PHP_NEW_EXTENSION(opcache,
    > >     ZendAccelerator.c \
    > > +@@ -339,10 +106,6 @@ int main() {
    > > +   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
    > > +   PHP_ADD_EXTENSION_DEP(opcache, pcre)
    > > +
    > > +-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" !=
    > "yes" && test "$have_shm_mmap_anon" != "yes"; then
    > > +-    AC_MSG_ERROR([No supported shared memory caching support was
    > found when configuring opcache. Check config.log for any errors or missing
    > dependencies.])
    > > +-  fi
    > > +-
    > > +   if test "$PHP_OPCACHE_JIT" = "yes"; then
    > > +     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
    > > +     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
    > >   --
    > >   2.17.1
    > >
    > > diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf
    > > b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf
    > > similarity index 100%
    > > rename from meta-oe/recipes-devtools/php/php/70_mod_php7.conf
    > > rename to meta-oe/recipes-devtools/php/php/70_mod_php8.conf
    > > diff --git
    > > a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > index a4804d1849..ed578d5e99 100644
    > > --- a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
    > > @@ -18,9 +18,9 @@ diff --git a/configure.ac <http://configure.ac> b/configure.ac <http://configure.ac>
    > >   index 2a474ba36d..6d22a21630 100644
    > >   --- a/configure.ac <http://configure.ac>
    > >   +++ b/configure.ac <http://configure.ac>
    > > -@@ -1323,7 +1323,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
    > > - fi
    > > - AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build
    > > date])
    > > +@@ -1288,7 +1288,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
    > > +EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
    > > + EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM
    > $PHP_LDFLAGS"
    > >
    > >   -UNAME=`uname -a | xargs`
    > >   +UNAME=`uname | xargs`
    > > diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch
    > > b/meta-oe/recipes-devtools/php/php/iconv.patch
    > > index 9ec8a89b57..9b2d85951c 100644
    > > --- a/meta-oe/recipes-devtools/php/php/iconv.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/iconv.patch
    > > @@ -5,16 +5,15 @@ Subject: [PATCH] From
    > 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
    > >   update patch to version 7.4.4
    > >   Signed-off-by: Changqing Li <[email protected] <mailto:[email protected]>>
    > >   ---
    > > - build/php.m4        | 3 ++-
    > > - ext/iconv/config.m4 | 2 +-
    > > - 2 files changed, 3 insertions(+), 2 deletions(-)
    > > + build/php.m4 | 3 ++-
    > > + 1 file changed, 2 insertions(+), 1 deletion(-)
    > >
    > >   diff --git a/build/php.m4 b/build/php.m4 -index 7392876..5c45d13
    > > 100644
    > > +index 93551d9c..dba50825 100644
    > >   --- a/build/php.m4
    > >   +++ b/build/php.m4
    > > -@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
    > > -   echo > ext/iconv/php_iconv_supports_errno.h
    > > +@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
    > > +   unset ICONV_DIR
    > >
    > >      dnl Check libc first if no path is provided in --with-iconv.
    > >   -  if test "$PHP_ICONV" = "yes"; then @@ -23,19 +22,6 @@ index
    > > 7392876..5c45d13 100644
    > >        dnl Reset LIBS temporarily as it may have already been included
    > -liconv in.
    > >        LIBS_save="$LIBS"
    > >        LIBS=
    > > -diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 -index
    > > fe9b47a..b6b632f 100644
    > > ---- a/ext/iconv/config.m4
    > > -+++ b/ext/iconv/config.m4
    > > -@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
    > > -
    > > -   if test "$iconv_avail" != "no"; then
    > > -     if test -z "$ICONV_DIR"; then
    > > --      for i in /usr/local /usr; do
    > > -+      for i in $PHP_ICONV /usr/local /usr; do
    > > -         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
    > > -           PHP_ICONV_PREFIX="$i"
    > > -           break
    > >   --
    > > -2.7.4
    > > +2.25.1
    > >
    > > diff --git
    > > a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > index 21057439c9..5c4fab3e55 100644
    > > --- a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > +++ b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
    > > @@ -1,4 +1,7 @@
    > > -php-ptest: xfail two tests
    > > +From 2b860634886d353fe34a5236642074a6f3106d3d Mon Sep 17 00:00:00
    > > +2001
    > > +From: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +Date: Tue, 12 Oct 2021 02:11:10 +0000
    > > +Subject: [PATCH] php-ptest: xfail two tests
    > >
    > >   If and when these tests are modified to expect the correct output, they will
    > >   succeed and generate warnings in the test summary.  This patch can then
    > be removed.
    > > @@ -9,26 +12,37 @@ Upstream-Status: Pending
    > >
    > >   Signed-off-By: Joe Slater <[email protected] <mailto:[email protected]>>
    > >
    > > +update patch to version 8.0.10
    > > +Signed-off-by: Lei Maohui <[email protected] <mailto:[email protected]>>
    > > +---
    > > + tests/basic/bug71273.phpt      | 2 ++
    > > + tests/run-test/bug75042-3.phpt | 2 ++
    > > + 2 files changed, 4 insertions(+)
    > >
    > > +diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
    > > +index 7634d432..50451d7b 100644
    > >   --- a/tests/basic/bug71273.phpt
    > >   +++ b/tests/basic/bug71273.phpt
    > > -@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
    > > -   var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
    > > +@@ -9,5 +9,7 @@ Bug #71273 A wrong ext directory setup in php.ini
    > > +leads to crash
    > > +
    > > +
    > > + var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s",
    > > + $out));
    > >    ?>
    > > - ==DONE==
    > >   +--XFAIL--
    > >   +Output is int(0), not int(1)
    > >    --EXPECT--
    > >    int(1)
    > > - ==DONE==
    > > +diff --git a/tests/run-test/bug75042-3.phpt
    > > +b/tests/run-test/bug75042-3.phpt index 5a30143b..1ca1055a 100644
    > >   --- a/tests/run-test/bug75042-3.phpt
    > >   +++ b/tests/run-test/bug75042-3.phpt -@@ -8,5 +8,8 @@
    > > display_errors=1
    > > - nonexistentsharedmodule
    > > +@@ -9,5 +9,7 @@ nonexistentsharedmodule
    > >    --FILE--
    > >    <?php
    > > -+?>
    > > + ?>
    > >   +--XFAIL--
    > >   +No warning message printed.
    > >    --EXPECTF--
    > > - PHP Warning:  PHP Startup: Unable to load dynamic library
    > > '%snonexistentsharedmodule.%s' %A
    > > + Warning: PHP Startup: Unable to load dynamic library
    > > +'%snonexistentsharedmodule.%s' %A
    > > +--
    > > +2.17.1
    > > +
    > > diff --git a/meta-oe/recipes-devtools/php/php_7.4.21.bb <http://php_7.4.21.bb>
    > > b/meta-oe/recipes-devtools/php/php_8.0.11.bb <http://php_8.0.11.bb>
    > > similarity index 98%
    > > rename from meta-oe/recipes-devtools/php/php_7.4.21.bb <http://php_7.4.21.bb>
    > > rename to meta-oe/recipes-devtools/php/php_8.0.11.bb <http://php_8.0.11.bb>
    > > index 916010a6ff..a8a2699cdb 100644
    > > --- a/meta-oe/recipes-devtools/php/php_7.4.21.bb <http://php_7.4.21.bb>
    > > +++ b/meta-oe/recipes-devtools/php/php_8.0.11.bb <http://php_8.0.11.bb>
    > > @@ -33,7 +33,7 @@ SRC_URI:append:class-target = " \
    > >             "
    > >
    > >   S = "${WORKDIR}/php-${PV}"
    > > -SRC_URI[sha256sum] =
    > "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
    > > +SRC_URI[sha256sum] =
    > "70ed874285e4010c1e2e8937bfb56b13b9ed1b3789dcaf274b793b00c1f4403a"
    > >
    > >
    > >   inherit autotools pkgconfig python3native gettext @@ -52,6 +52,7 @@
    > > COMMON_EXTRA_OECONF = "--enable-sockets \
    > >                          --disable-rpath \
    > >                          --with-pic \
    > >                          --libdir=${PHP_LIBDIR} \
    > > +                       --disable-opcache-jit \
    > 
    > why do we need to disable jit ? and what are its effects in terms of
    > performance ?
    > 
    > >   "
    > >   EXTRA_OECONF = "--enable-mbstring \
    > >                   --enable-fpm \
    > >
    > >
    > >
    > > 
    > >

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93642): https://lists.openembedded.org/g/openembedded-devel/message/93642
Mute This Topic: https://lists.openembedded.org/mt/86409155/4618432
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-