diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch | 170 |
1 files changed, 23 insertions, 147 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 34f433f40..ee0d5edcd 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch @@ -1,30 +1,27 @@ -From 8de5ba69d20d049b8ca983a9470c7303142ec0b3 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Sun, 28 Apr 2019 16:55:13 +0800 -Subject: [PATCH] From fb139d9707dabe1684b472a08a6eb5761ede4a3a Mon Sep 17 - 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Tue, 12 - Feb 2019 14:56:16 +0800 Subject: [PATCH] opcache/config.m4: enable opcache +opcache/config.m4: enable opcache -We can't use AC_TRY_RUN to run programs in a cross compile environment. Set -the variables directly instead since we know that we'd be running on latest +We can't use AC_TRY_RUN to run programs in a cross compile environment. +Set +the variables directly instead since we know that we'd be running on +latest enough linux kernel. Upstream-Status: Inappropriate [Configuration] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> -update patch to version 7.3.4 +update patch to version 7.4.4 Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - ext/opcache/config.m4 | 312 +------------------------------------------------- - 1 file changed, 6 insertions(+), 306 deletions(-) + ext/opcache/config.m4 | 194 +------------------------------------------------- + 1 file changed, 3 insertions(+), 191 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index 4810217..22c3d61 100644 +index 6c40caf..84ddf1e 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 -@@ -27,319 +27,19 @@ if test "$PHP_OPCACHE" != "no"; then - AC_CHECK_HEADERS([unistd.h sys/uio.h]) +@@ -23,201 +23,13 @@ if test "$PHP_OPCACHE" != "no"; then + AC_CHECK_FUNCS([mprotect]) AC_MSG_CHECKING(for sysvipc shared memory support) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -95,9 +92,8 @@ index 4810217..22c3d61 100644 - AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) - msg=yes],[msg=no],[msg=no]) - AC_MSG_RESULT([$msg]) -- + 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) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <sys/types.h> @@ -114,7 +110,8 @@ index 4810217..22c3d61 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; @@ -149,64 +146,8 @@ index 4810217..22c3d61 100644 - 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]) -+ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) - - AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <sys/types.h> --#include <sys/wait.h> --#include <sys/mman.h> --#include <sys/stat.h> --#include <fcntl.h> --#include <unistd.h> --#include <string.h> -- --#ifndef MAP_FAILED --# define MAP_FAILED ((void*)-1) --#endif -- --int main() { -- pid_t pid; -- int status; -- int fd; -- char *shm; -- -- fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); -- if (fd == -1) { -- return 1; -- } -- -- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); -- if (shm == MAP_FAILED) { -- return 2; -- } -- -- strcpy(shm, "hello"); - -- pid = fork(); -- if (pid < 0) { -- return 5; -- } else if (pid == 0) { -- strcpy(shm, "bye"); -- return 6; -- } -- if (wait(&status) != pid) { -- return 7; -- } -- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { -- return 8; -- } -- if (strcmp(shm, "bye") != 0) { -- return 9; -- } -- return 0; --} --]])],[dnl -- AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) -+ AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) - +- PHP_CHECK_FUNC_LIB(shm_open, rt) AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <sys/types.h> @@ -230,7 +171,7 @@ index 4810217..22c3d61 100644 - char *shm; - char tmpname[4096]; - -- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); +- sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid()); - if (mktemp(tmpname) == NULL) { - return 1; - } @@ -273,80 +214,15 @@ index 4810217..22c3d61 100644 -} -]])],[dnl - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) +- AC_MSG_RESULT([yes]) +- PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) +- ],[ +- AC_MSG_RESULT([no]) +- ],[ +- AC_MSG_RESULT([no]) +- ]) + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) - AC_MSG_CHECKING(for mmap() using regular file shared memory support) -- AC_RUN_IFELSE([AC_LANG_SOURCE([[ --#include <sys/types.h> --#include <sys/wait.h> --#include <sys/mman.h> --#include <sys/stat.h> --#include <fcntl.h> --#include <unistd.h> --#include <string.h> --#include <stdlib.h> --#include <stdio.h> -- --#ifndef MAP_FAILED --# define MAP_FAILED ((void*)-1) --#endif -- --int main() { -- pid_t pid; -- int status; -- int fd; -- char *shm; -- char tmpname[4096]; -- -- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); -- if (mktemp(tmpname) == NULL) { -- return 1; -- } -- fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); -- if (fd == -1) { -- return 2; -- } -- if (ftruncate(fd, 4096) < 0) { -- close(fd); -- unlink(tmpname); -- return 3; -- } -- -- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); -- if (shm == MAP_FAILED) { -- return 4; -- } -- unlink(tmpname); -- close(fd); -- -- strcpy(shm, "hello"); -- -- pid = fork(); -- if (pid < 0) { -- return 5; -- } else if (pid == 0) { -- strcpy(shm, "bye"); -- return 6; -- } -- if (wait(&status) != pid) { -- return 7; -- } -- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { -- return 8; -- } -- if (strcmp(shm, "bye") != 0) { -- return 9; -- } -- return 0; --} --]])],[dnl -- AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) -- msg=yes],[msg=no],[msg=no]) -- AC_MSG_RESULT([$msg]) -+ AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) - PHP_NEW_EXTENSION(opcache, ZendAccelerator.c \ -- |