From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- .../0001-opcache-config.m4-enable-opcache.patch | 246 ++++----------------- 1 file changed, 49 insertions(+), 197 deletions(-) (limited to 'external/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch') diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/external/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch index 0d24d34f..1f3e683a 100644 --- a/external/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch +++ b/external/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch @@ -1,51 +1,55 @@ -From b2fb725dc404d471371731b663234e87cb0fca84 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Mon, 2 Apr 2018 17:54:52 +0800 +From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00 2001 +From: Claude Bing +Date: Fri, 8 May 2020 10:15:32 -0400 Subject: [PATCH] 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 + +update patch to version 7.4.4 +Signed-off-by: Changqing Li + +fix issue linking with librt +Signed-off-by: Claude Bing --- - ext/opcache/config.m4 | 349 ++------------------------------------------------ - 1 file changed, 8 insertions(+), 341 deletions(-) + ext/opcache/config.m4 | 195 +----------------------------------------- + 1 file changed, 4 insertions(+), 191 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 -index 7b500f0..10bb99a 100644 +index 6c40cafc1c..6569aa9e1c 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 -@@ -28,353 +28,20 @@ if test "$PHP_OPCACHE" != "no"; then - - AC_CHECK_HEADERS([unistd.h sys/uio.h]) +@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then + AC_CHECK_FUNCS([mprotect]) -- AC_MSG_CHECKING(for sysvipc shared memory support) -- AC_TRY_RUN([ + AC_MSG_CHECKING(for sysvipc shared memory support) +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include -#include -#include -#include -+ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) - +- -int main() { - pid_t pid; - int status; - int ipc_id; - char *shm; - struct shmid_ds shmbuf; -+ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) - +- - ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); - if (ipc_id == -1) { - return 1; - } -+ AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) - +- - shm = shmat(ipc_id, NULL, 0); - if (shm == (void *)-1) { - shmctl(ipc_id, IPC_RMID, NULL); @@ -90,13 +94,14 @@ index 7b500f0..10bb99a 100644 - } - return 0; -} --],dnl +-]])],[dnl - AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) -- msg=yes,msg=no,msg=no) +- msg=yes],[msg=no],[msg=no]) - AC_MSG_RESULT([$msg]) -- -- AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) -- AC_TRY_RUN([ ++ 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 -#include -#include @@ -111,7 +116,8 @@ index 7b500f0..10bb99a 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; @@ -142,68 +148,14 @@ index 7b500f0..10bb99a 100644 - } - return 0; -} --],dnl +-]])],[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]) -- -- AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) -- AC_TRY_RUN([ --#include --#include --#include --#include --#include --#include --#include -- --#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) +- msg=yes],[msg=no],[msg=no]) - AC_MSG_RESULT([$msg]) - -- AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) -- AC_TRY_RUN([ +- 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 -#include -#include @@ -225,7 +177,7 @@ index 7b500f0..10bb99a 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; - } @@ -266,120 +218,20 @@ index 7b500f0..10bb99a 100644 - } - return 0; -} --],dnl +-]])],[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]) ++ PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) - AC_MSG_CHECKING(for mmap() using regular file shared memory support) -- AC_TRY_RUN([ --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#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]) -- --flock_type=unknown --AC_MSG_CHECKING("whether flock struct is linux ordered") --AC_TRY_RUN([ -- #include -- struct flock lock = { 1, 2, 3, 4, 5 }; -- int main() { -- if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { -- return 0; -- } -- return 1; -- } --], [ -- flock_type=linux -- AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) -- AC_MSG_RESULT("yes") --], AC_MSG_RESULT("no") ) -+ -+ AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) - --AC_MSG_CHECKING("whether flock struct is BSD ordered") --AC_TRY_RUN([ -- #include -- struct flock lock = { 1, 2, 3, 4, 5 }; -- int main() { -- if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { -- return 0; -- } -- return 1; -- } --], [ -- flock_type=bsd -- AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) -- AC_MSG_RESULT("yes") --], AC_MSG_RESULT("no") ) -+ flock_type=linux -+ AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) - - if test "$flock_type" = "unknown"; then - AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) + PHP_NEW_EXTENSION(opcache, + ZendAccelerator.c \ -- -2.7.4 +2.17.1 -- cgit 1.2.3-korg