mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-07 14:44:41 +02:00
License-Update: 7.x version trim trailing whitespace 7.x: * drop CVE-2017-9120.patch since it cannot resolve the CVE * use recommand option --with-libzip, bundled libzip is deprecated * update patches 5.x: * use recommand option --with-libzip, bundled libzip is deprecated * update patches * Fix php 7.x cross build on hosts which have libxml2 installed libxml2 is not detected properly, it pokes at host and takes the libraries and header files added to build which links in libraries like libicu which may not be available in sysroot causing configure failures like checking for sqlite3 files in default path... found in TOPDIR/build/tmp/work/aarch64-yoe-linux/php/7.3.2-r0/recipe-sysroot/usr/lib/.. checking for SQLite 3.3.9+... checking for sqlite3_prepare_v2 in -lsqlite3... no not found configure: error: Please install SQLite 3.3.9 first or check libsqlite3 is present the reason is configure test fails to find icu libraries since they were added based on build host's libxml2.pc Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
408 lines
9.1 KiB
Diff
408 lines
9.1 KiB
Diff
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
|
|
|
|
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.2
|
|
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
|
---
|
|
ext/opcache/config.m4 | 357 +-------------------------------------------------
|
|
1 file changed, 6 insertions(+), 351 deletions(-)
|
|
|
|
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
|
|
index 392f4c6..6617693 100644
|
|
--- a/ext/opcache/config.m4
|
|
+++ b/ext/opcache/config.m4
|
|
@@ -27,374 +27,29 @@ if test "$PHP_OPCACHE" != "no"; then
|
|
AC_CHECK_HEADERS([unistd.h sys/uio.h])
|
|
|
|
AC_MSG_CHECKING(for sysvipc shared memory support)
|
|
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
-#include <sys/types.h>
|
|
-#include <sys/wait.h>
|
|
-#include <sys/ipc.h>
|
|
-#include <sys/shm.h>
|
|
-#include <unistd.h>
|
|
-#include <string.h>
|
|
-
|
|
-int main() {
|
|
- pid_t pid;
|
|
- int status;
|
|
- int ipc_id;
|
|
- char *shm;
|
|
- struct shmid_ds shmbuf;
|
|
-
|
|
- ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W));
|
|
- if (ipc_id == -1) {
|
|
- return 1;
|
|
- }
|
|
-
|
|
- shm = shmat(ipc_id, NULL, 0);
|
|
- if (shm == (void *)-1) {
|
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
|
- return 2;
|
|
- }
|
|
-
|
|
- if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) {
|
|
- shmdt(shm);
|
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
|
- return 3;
|
|
- }
|
|
-
|
|
- shmbuf.shm_perm.uid = getuid();
|
|
- shmbuf.shm_perm.gid = getgid();
|
|
- shmbuf.shm_perm.mode = 0600;
|
|
-
|
|
- if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) {
|
|
- shmdt(shm);
|
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
|
- return 4;
|
|
- }
|
|
-
|
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
|
-
|
|
- 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_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>
|
|
-#include <sys/wait.h>
|
|
-#include <sys/mman.h>
|
|
-#include <unistd.h>
|
|
-#include <string.h>
|
|
-
|
|
-#ifndef MAP_ANON
|
|
-# ifdef MAP_ANONYMOUS
|
|
-# define MAP_ANON MAP_ANONYMOUS
|
|
-# endif
|
|
-#endif
|
|
-#ifndef MAP_FAILED
|
|
-# define MAP_FAILED ((void*)-1)
|
|
-#endif
|
|
-
|
|
-int main() {
|
|
- pid_t pid;
|
|
- int status;
|
|
- char *shm;
|
|
-
|
|
- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
|
|
- if (shm == MAP_FAILED) {
|
|
- return 1;
|
|
- }
|
|
-
|
|
- 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_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])
|
|
|
|
AC_MSG_CHECKING(for mmap() using shm_open() 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 = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
|
|
- if (fd == -1) {
|
|
- return 2;
|
|
- }
|
|
- if (ftruncate(fd, 4096) < 0) {
|
|
- close(fd);
|
|
- shm_unlink(tmpname);
|
|
- return 3;
|
|
- }
|
|
-
|
|
- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
|
- if (shm == MAP_FAILED) {
|
|
- return 4;
|
|
- }
|
|
- shm_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_POSIX, 1, [Define if you have POSIX mmap() SHM support])
|
|
- msg=yes],[msg=no],[msg=no])
|
|
- AC_MSG_RESULT([$msg])
|
|
+ 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])
|
|
|
|
flock_type=unknown
|
|
AC_MSG_CHECKING(for struct flock layout)
|
|
|
|
if test "$flock_type" = "unknown"; then
|
|
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
- #include <fcntl.h>
|
|
- struct flock lock = { 1, 2, 3, 4, 5, 6, 7 };
|
|
- int main() {
|
|
- if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 6 && lock.l_len== 7) {
|
|
- return 0;
|
|
- }
|
|
- return 1;
|
|
- }
|
|
-]])], [
|
|
- flock_type=aix64
|
|
- AC_DEFINE([HAVE_FLOCK_AIX64], [], [Struct flock is 64-bit AIX-type])
|
|
-], [])
|
|
-fi
|
|
-
|
|
-if test "$flock_type" = "unknown"; then
|
|
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
- #include <fcntl.h>
|
|
- 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
|
|
+ flock_type=linux
|
|
AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
|
|
-], [])
|
|
fi
|
|
|
|
if test "$flock_type" = "unknown"; then
|
|
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
- #include <fcntl.h>
|
|
- 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])
|
|
-], [])
|
|
-fi
|
|
-
|
|
-AC_MSG_RESULT([$flock_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])
|
|
fi
|
|
|
|
--
|
|
2.7.4
|
|
|