diff options
7 files changed, 822 insertions, 26 deletions
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc index fbc750df8f..8ba218c72c 100644 --- a/meta-oe/recipes-devtools/php/php.inc +++ b/meta-oe/recipes-devtools/php/php.inc | |||
| @@ -21,7 +21,7 @@ SRC_URI_append_class-target = " \ | |||
| 21 | file://php_exec_native.patch \ | 21 | file://php_exec_native.patch \ |
| 22 | file://php-fpm.conf \ | 22 | file://php-fpm.conf \ |
| 23 | file://php-fpm-apache.conf \ | 23 | file://php-fpm-apache.conf \ |
| 24 | file://configure.patch \ | 24 | file://0001-acinclude.m4-don-t-unset-cache-variables.patch \ |
| 25 | file://70_mod_php${PHP_MAJOR_VERSION}.conf \ | 25 | file://70_mod_php${PHP_MAJOR_VERSION}.conf \ |
| 26 | file://php-fpm.service \ | 26 | file://php-fpm.service \ |
| 27 | " | 27 | " |
| @@ -40,7 +40,6 @@ PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}" | |||
| 40 | COMMON_EXTRA_OECONF = "--enable-sockets \ | 40 | COMMON_EXTRA_OECONF = "--enable-sockets \ |
| 41 | --enable-pcntl \ | 41 | --enable-pcntl \ |
| 42 | --enable-shared \ | 42 | --enable-shared \ |
| 43 | --disable-opcache \ | ||
| 44 | --disable-rpath \ | 43 | --disable-rpath \ |
| 45 | --with-pic \ | 44 | --with-pic \ |
| 46 | --libdir=${PHP_LIBDIR} \ | 45 | --libdir=${PHP_LIBDIR} \ |
| @@ -59,6 +58,9 @@ EXTRA_OECONF = "--enable-mbstring \ | |||
| 59 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ | 58 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ |
| 60 | ${COMMON_EXTRA_OECONF} \ | 59 | ${COMMON_EXTRA_OECONF} \ |
| 61 | " | 60 | " |
| 61 | |||
| 62 | CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes" | ||
| 63 | |||
| 62 | EXTRA_OECONF_class-native = " \ | 64 | EXTRA_OECONF_class-native = " \ |
| 63 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | 65 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ |
| 64 | --without-iconv \ | 66 | --without-iconv \ |
| @@ -89,7 +91,7 @@ PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ | |||
| 89 | ,--without-imap --without-imap-ssl \ | 91 | ,--without-imap --without-imap-ssl \ |
| 90 | ,uw-imap" | 92 | ,uw-imap" |
| 91 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 93 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 92 | 94 | PACKAGECONFIG[opcache] = ",--disable-opcache" | |
| 93 | 95 | ||
| 94 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" | 96 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" |
| 95 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" | 97 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" |
| @@ -196,14 +198,14 @@ php_sysroot_preprocess () { | |||
| 196 | 198 | ||
| 197 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" | 199 | MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" |
| 198 | 200 | ||
| 199 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" | 201 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" |
| 200 | 202 | ||
| 201 | RDEPENDS_${PN} += "libgcc" | 203 | RDEPENDS_${PN} += "libgcc" |
| 202 | RDEPENDS_${PN}-pear = "${PN}" | 204 | RDEPENDS_${PN}-pear = "${PN}" |
| 203 | RDEPENDS_${PN}-phar = "${PN}-cli" | 205 | RDEPENDS_${PN}-phar = "${PN}-cli" |
| 204 | RDEPENDS_${PN}-cli = "${PN}" | 206 | RDEPENDS_${PN}-cli = "${PN}" |
| 205 | RDEPENDS_${PN}-modphp = "${PN} apache2" | 207 | RDEPENDS_${PN}-modphp = "${PN} apache2" |
| 206 | RDEPENDS_${PN}-dev = "${PN}" | 208 | RDEPENDS_${PN}-opcache = "${PN}" |
| 207 | 209 | ||
| 208 | INITSCRIPT_PACKAGES = "${PN}-fpm" | 210 | INITSCRIPT_PACKAGES = "${PN}-fpm" |
| 209 | inherit update-rc.d | 211 | inherit update-rc.d |
| @@ -232,6 +234,8 @@ FILES_${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ | |||
| 232 | ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ | 234 | ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ |
| 233 | ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ | 235 | ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ |
| 234 | ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" | 236 | ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" |
| 237 | FILES_${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" | ||
| 238 | FILES_${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" | ||
| 235 | FILES_${PN} = "${PHP_LIBDIR}/php" | 239 | FILES_${PN} = "${PHP_LIBDIR}/php" |
| 236 | FILES_${PN} += "${bindir}" | 240 | FILES_${PN} += "${bindir}" |
| 237 | 241 | ||
diff --git a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch new file mode 100644 index 0000000000..a250cac83a --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From dfebe81f946a83fe2499fc84d4f3dbdc5612276c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
| 3 | Date: Tue, 3 Apr 2018 11:35:03 +0800 | ||
| 4 | Subject: [PATCH] acinclude.m4: don't unset cache variables | ||
| 5 | |||
| 6 | Unsetting prevents cache variable from being passed to configure. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [OE-specific] | ||
| 9 | |||
| 10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 11 | --- | ||
| 12 | acinclude.m4 | 4 ---- | ||
| 13 | 1 file changed, 4 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/acinclude.m4 b/acinclude.m4 | ||
| 16 | index f6a55ec..d3346df 100644 | ||
| 17 | --- a/acinclude.m4 | ||
| 18 | +++ b/acinclude.m4 | ||
| 19 | @@ -1890,8 +1890,6 @@ define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])) | ||
| 20 | dnl | ||
| 21 | AC_DEFUN([PHP_CHECK_FUNC_LIB],[ | ||
| 22 | ifelse($2,,:,[ | ||
| 23 | - unset ac_cv_lib_$2[]_$1 | ||
| 24 | - unset ac_cv_lib_$2[]___$1 | ||
| 25 | unset found | ||
| 26 | AC_CHECK_LIB($2, $1, [found=yes], [ | ||
| 27 | AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) | ||
| 28 | @@ -1923,8 +1921,6 @@ dnl in the default libraries and as a fall back in the specified library. | ||
| 29 | dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS. | ||
| 30 | dnl | ||
| 31 | AC_DEFUN([PHP_CHECK_FUNC],[ | ||
| 32 | - unset ac_cv_func_$1 | ||
| 33 | - unset ac_cv_func___$1 | ||
| 34 | unset found | ||
| 35 | |||
| 36 | AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ]) | ||
| 37 | -- | ||
| 38 | 2.7.4 | ||
| 39 | |||
diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch new file mode 100644 index 0000000000..0d24d34f2b --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch | |||
| @@ -0,0 +1,385 @@ | |||
| 1 | From b2fb725dc404d471371731b663234e87cb0fca84 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
| 3 | Date: Mon, 2 Apr 2018 17:54:52 +0800 | ||
| 4 | Subject: [PATCH] opcache/config.m4: enable opcache | ||
| 5 | |||
| 6 | We can't use AC_TRY_RUN to run programs in a cross compile environment. Set | ||
| 7 | the variables directly instead since we know that we'd be running on latest | ||
| 8 | enough linux kernel. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [Configuration] | ||
| 11 | |||
| 12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 13 | --- | ||
| 14 | ext/opcache/config.m4 | 349 ++------------------------------------------------ | ||
| 15 | 1 file changed, 8 insertions(+), 341 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 | ||
| 18 | index 7b500f0..10bb99a 100644 | ||
| 19 | --- a/ext/opcache/config.m4 | ||
| 20 | +++ b/ext/opcache/config.m4 | ||
| 21 | @@ -28,353 +28,20 @@ if test "$PHP_OPCACHE" != "no"; then | ||
| 22 | |||
| 23 | AC_CHECK_HEADERS([unistd.h sys/uio.h]) | ||
| 24 | |||
| 25 | - AC_MSG_CHECKING(for sysvipc shared memory support) | ||
| 26 | - AC_TRY_RUN([ | ||
| 27 | -#include <sys/types.h> | ||
| 28 | -#include <sys/wait.h> | ||
| 29 | -#include <sys/ipc.h> | ||
| 30 | -#include <sys/shm.h> | ||
| 31 | -#include <unistd.h> | ||
| 32 | -#include <string.h> | ||
| 33 | + AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | ||
| 34 | |||
| 35 | -int main() { | ||
| 36 | - pid_t pid; | ||
| 37 | - int status; | ||
| 38 | - int ipc_id; | ||
| 39 | - char *shm; | ||
| 40 | - struct shmid_ds shmbuf; | ||
| 41 | + AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | ||
| 42 | |||
| 43 | - ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); | ||
| 44 | - if (ipc_id == -1) { | ||
| 45 | - return 1; | ||
| 46 | - } | ||
| 47 | + AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) | ||
| 48 | |||
| 49 | - shm = shmat(ipc_id, NULL, 0); | ||
| 50 | - if (shm == (void *)-1) { | ||
| 51 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 52 | - return 2; | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { | ||
| 56 | - shmdt(shm); | ||
| 57 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 58 | - return 3; | ||
| 59 | - } | ||
| 60 | - | ||
| 61 | - shmbuf.shm_perm.uid = getuid(); | ||
| 62 | - shmbuf.shm_perm.gid = getgid(); | ||
| 63 | - shmbuf.shm_perm.mode = 0600; | ||
| 64 | - | ||
| 65 | - if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { | ||
| 66 | - shmdt(shm); | ||
| 67 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 68 | - return 4; | ||
| 69 | - } | ||
| 70 | - | ||
| 71 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 72 | - | ||
| 73 | - strcpy(shm, "hello"); | ||
| 74 | - | ||
| 75 | - pid = fork(); | ||
| 76 | - if (pid < 0) { | ||
| 77 | - return 5; | ||
| 78 | - } else if (pid == 0) { | ||
| 79 | - strcpy(shm, "bye"); | ||
| 80 | - return 6; | ||
| 81 | - } | ||
| 82 | - if (wait(&status) != pid) { | ||
| 83 | - return 7; | ||
| 84 | - } | ||
| 85 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 86 | - return 8; | ||
| 87 | - } | ||
| 88 | - if (strcmp(shm, "bye") != 0) { | ||
| 89 | - return 9; | ||
| 90 | - } | ||
| 91 | - return 0; | ||
| 92 | -} | ||
| 93 | -],dnl | ||
| 94 | - AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | ||
| 95 | - msg=yes,msg=no,msg=no) | ||
| 96 | - AC_MSG_RESULT([$msg]) | ||
| 97 | - | ||
| 98 | - AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) | ||
| 99 | - AC_TRY_RUN([ | ||
| 100 | -#include <sys/types.h> | ||
| 101 | -#include <sys/wait.h> | ||
| 102 | -#include <sys/mman.h> | ||
| 103 | -#include <unistd.h> | ||
| 104 | -#include <string.h> | ||
| 105 | - | ||
| 106 | -#ifndef MAP_ANON | ||
| 107 | -# ifdef MAP_ANONYMOUS | ||
| 108 | -# define MAP_ANON MAP_ANONYMOUS | ||
| 109 | -# endif | ||
| 110 | -#endif | ||
| 111 | -#ifndef MAP_FAILED | ||
| 112 | -# define MAP_FAILED ((void*)-1) | ||
| 113 | -#endif | ||
| 114 | - | ||
| 115 | -int main() { | ||
| 116 | - pid_t pid; | ||
| 117 | - int status; | ||
| 118 | - char *shm; | ||
| 119 | - | ||
| 120 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); | ||
| 121 | - if (shm == MAP_FAILED) { | ||
| 122 | - return 1; | ||
| 123 | - } | ||
| 124 | - | ||
| 125 | - strcpy(shm, "hello"); | ||
| 126 | - | ||
| 127 | - pid = fork(); | ||
| 128 | - if (pid < 0) { | ||
| 129 | - return 5; | ||
| 130 | - } else if (pid == 0) { | ||
| 131 | - strcpy(shm, "bye"); | ||
| 132 | - return 6; | ||
| 133 | - } | ||
| 134 | - if (wait(&status) != pid) { | ||
| 135 | - return 7; | ||
| 136 | - } | ||
| 137 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 138 | - return 8; | ||
| 139 | - } | ||
| 140 | - if (strcmp(shm, "bye") != 0) { | ||
| 141 | - return 9; | ||
| 142 | - } | ||
| 143 | - return 0; | ||
| 144 | -} | ||
| 145 | -],dnl | ||
| 146 | - AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | ||
| 147 | - msg=yes,msg=no,msg=no) | ||
| 148 | - AC_MSG_RESULT([$msg]) | ||
| 149 | - | ||
| 150 | - AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) | ||
| 151 | - AC_TRY_RUN([ | ||
| 152 | -#include <sys/types.h> | ||
| 153 | -#include <sys/wait.h> | ||
| 154 | -#include <sys/mman.h> | ||
| 155 | -#include <sys/stat.h> | ||
| 156 | -#include <fcntl.h> | ||
| 157 | -#include <unistd.h> | ||
| 158 | -#include <string.h> | ||
| 159 | - | ||
| 160 | -#ifndef MAP_FAILED | ||
| 161 | -# define MAP_FAILED ((void*)-1) | ||
| 162 | -#endif | ||
| 163 | - | ||
| 164 | -int main() { | ||
| 165 | - pid_t pid; | ||
| 166 | - int status; | ||
| 167 | - int fd; | ||
| 168 | - char *shm; | ||
| 169 | - | ||
| 170 | - fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); | ||
| 171 | - if (fd == -1) { | ||
| 172 | - return 1; | ||
| 173 | - } | ||
| 174 | - | ||
| 175 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 176 | - if (shm == MAP_FAILED) { | ||
| 177 | - return 2; | ||
| 178 | - } | ||
| 179 | - | ||
| 180 | - strcpy(shm, "hello"); | ||
| 181 | - | ||
| 182 | - pid = fork(); | ||
| 183 | - if (pid < 0) { | ||
| 184 | - return 5; | ||
| 185 | - } else if (pid == 0) { | ||
| 186 | - strcpy(shm, "bye"); | ||
| 187 | - return 6; | ||
| 188 | - } | ||
| 189 | - if (wait(&status) != pid) { | ||
| 190 | - return 7; | ||
| 191 | - } | ||
| 192 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 193 | - return 8; | ||
| 194 | - } | ||
| 195 | - if (strcmp(shm, "bye") != 0) { | ||
| 196 | - return 9; | ||
| 197 | - } | ||
| 198 | - return 0; | ||
| 199 | -} | ||
| 200 | -],dnl | ||
| 201 | - AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) | ||
| 202 | - msg=yes,msg=no,msg=no) | ||
| 203 | - AC_MSG_RESULT([$msg]) | ||
| 204 | - | ||
| 205 | - AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) | ||
| 206 | - AC_TRY_RUN([ | ||
| 207 | -#include <sys/types.h> | ||
| 208 | -#include <sys/wait.h> | ||
| 209 | -#include <sys/mman.h> | ||
| 210 | -#include <sys/stat.h> | ||
| 211 | -#include <fcntl.h> | ||
| 212 | -#include <unistd.h> | ||
| 213 | -#include <string.h> | ||
| 214 | -#include <stdlib.h> | ||
| 215 | -#include <stdio.h> | ||
| 216 | - | ||
| 217 | -#ifndef MAP_FAILED | ||
| 218 | -# define MAP_FAILED ((void*)-1) | ||
| 219 | -#endif | ||
| 220 | - | ||
| 221 | -int main() { | ||
| 222 | - pid_t pid; | ||
| 223 | - int status; | ||
| 224 | - int fd; | ||
| 225 | - char *shm; | ||
| 226 | - char tmpname[4096]; | ||
| 227 | - | ||
| 228 | - sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); | ||
| 229 | - if (mktemp(tmpname) == NULL) { | ||
| 230 | - return 1; | ||
| 231 | - } | ||
| 232 | - fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); | ||
| 233 | - if (fd == -1) { | ||
| 234 | - return 2; | ||
| 235 | - } | ||
| 236 | - if (ftruncate(fd, 4096) < 0) { | ||
| 237 | - close(fd); | ||
| 238 | - shm_unlink(tmpname); | ||
| 239 | - return 3; | ||
| 240 | - } | ||
| 241 | - | ||
| 242 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 243 | - if (shm == MAP_FAILED) { | ||
| 244 | - return 4; | ||
| 245 | - } | ||
| 246 | - shm_unlink(tmpname); | ||
| 247 | - close(fd); | ||
| 248 | - | ||
| 249 | - strcpy(shm, "hello"); | ||
| 250 | - | ||
| 251 | - pid = fork(); | ||
| 252 | - if (pid < 0) { | ||
| 253 | - return 5; | ||
| 254 | - } else if (pid == 0) { | ||
| 255 | - strcpy(shm, "bye"); | ||
| 256 | - return 6; | ||
| 257 | - } | ||
| 258 | - if (wait(&status) != pid) { | ||
| 259 | - return 7; | ||
| 260 | - } | ||
| 261 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 262 | - return 8; | ||
| 263 | - } | ||
| 264 | - if (strcmp(shm, "bye") != 0) { | ||
| 265 | - return 9; | ||
| 266 | - } | ||
| 267 | - return 0; | ||
| 268 | -} | ||
| 269 | -],dnl | ||
| 270 | - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | ||
| 271 | - msg=yes,msg=no,msg=no) | ||
| 272 | - AC_MSG_RESULT([$msg]) | ||
| 273 | + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | ||
| 274 | |||
| 275 | AC_MSG_CHECKING(for mmap() using regular file shared memory support) | ||
| 276 | - AC_TRY_RUN([ | ||
| 277 | -#include <sys/types.h> | ||
| 278 | -#include <sys/wait.h> | ||
| 279 | -#include <sys/mman.h> | ||
| 280 | -#include <sys/stat.h> | ||
| 281 | -#include <fcntl.h> | ||
| 282 | -#include <unistd.h> | ||
| 283 | -#include <string.h> | ||
| 284 | -#include <stdlib.h> | ||
| 285 | -#include <stdio.h> | ||
| 286 | - | ||
| 287 | -#ifndef MAP_FAILED | ||
| 288 | -# define MAP_FAILED ((void*)-1) | ||
| 289 | -#endif | ||
| 290 | - | ||
| 291 | -int main() { | ||
| 292 | - pid_t pid; | ||
| 293 | - int status; | ||
| 294 | - int fd; | ||
| 295 | - char *shm; | ||
| 296 | - char tmpname[4096]; | ||
| 297 | - | ||
| 298 | - sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); | ||
| 299 | - if (mktemp(tmpname) == NULL) { | ||
| 300 | - return 1; | ||
| 301 | - } | ||
| 302 | - fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); | ||
| 303 | - if (fd == -1) { | ||
| 304 | - return 2; | ||
| 305 | - } | ||
| 306 | - if (ftruncate(fd, 4096) < 0) { | ||
| 307 | - close(fd); | ||
| 308 | - unlink(tmpname); | ||
| 309 | - return 3; | ||
| 310 | - } | ||
| 311 | - | ||
| 312 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 313 | - if (shm == MAP_FAILED) { | ||
| 314 | - return 4; | ||
| 315 | - } | ||
| 316 | - unlink(tmpname); | ||
| 317 | - close(fd); | ||
| 318 | - | ||
| 319 | - strcpy(shm, "hello"); | ||
| 320 | - | ||
| 321 | - pid = fork(); | ||
| 322 | - if (pid < 0) { | ||
| 323 | - return 5; | ||
| 324 | - } else if (pid == 0) { | ||
| 325 | - strcpy(shm, "bye"); | ||
| 326 | - return 6; | ||
| 327 | - } | ||
| 328 | - if (wait(&status) != pid) { | ||
| 329 | - return 7; | ||
| 330 | - } | ||
| 331 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 332 | - return 8; | ||
| 333 | - } | ||
| 334 | - if (strcmp(shm, "bye") != 0) { | ||
| 335 | - return 9; | ||
| 336 | - } | ||
| 337 | - return 0; | ||
| 338 | -} | ||
| 339 | -],dnl | ||
| 340 | - AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) | ||
| 341 | - msg=yes,msg=no,msg=no) | ||
| 342 | - AC_MSG_RESULT([$msg]) | ||
| 343 | - | ||
| 344 | -flock_type=unknown | ||
| 345 | -AC_MSG_CHECKING("whether flock struct is linux ordered") | ||
| 346 | -AC_TRY_RUN([ | ||
| 347 | - #include <fcntl.h> | ||
| 348 | - struct flock lock = { 1, 2, 3, 4, 5 }; | ||
| 349 | - int main() { | ||
| 350 | - if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { | ||
| 351 | - return 0; | ||
| 352 | - } | ||
| 353 | - return 1; | ||
| 354 | - } | ||
| 355 | -], [ | ||
| 356 | - flock_type=linux | ||
| 357 | - AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) | ||
| 358 | - AC_MSG_RESULT("yes") | ||
| 359 | -], AC_MSG_RESULT("no") ) | ||
| 360 | + | ||
| 361 | + AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) | ||
| 362 | |||
| 363 | -AC_MSG_CHECKING("whether flock struct is BSD ordered") | ||
| 364 | -AC_TRY_RUN([ | ||
| 365 | - #include <fcntl.h> | ||
| 366 | - struct flock lock = { 1, 2, 3, 4, 5 }; | ||
| 367 | - int main() { | ||
| 368 | - if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { | ||
| 369 | - return 0; | ||
| 370 | - } | ||
| 371 | - return 1; | ||
| 372 | - } | ||
| 373 | -], [ | ||
| 374 | - flock_type=bsd | ||
| 375 | - AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) | ||
| 376 | - AC_MSG_RESULT("yes") | ||
| 377 | -], AC_MSG_RESULT("no") ) | ||
| 378 | + flock_type=linux | ||
| 379 | + AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) | ||
| 380 | |||
| 381 | if test "$flock_type" = "unknown"; then | ||
| 382 | AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) | ||
| 383 | -- | ||
| 384 | 2.7.4 | ||
| 385 | |||
diff --git a/meta-oe/recipes-devtools/php/php/configure.patch b/meta-oe/recipes-devtools/php/php/configure.patch deleted file mode 100644 index d9d913f9da..0000000000 --- a/meta-oe/recipes-devtools/php/php/configure.patch +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | From 617d01ef2ac2f436cd8e06555b608db56079b851 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 3 | Date: Tue, 17 Jul 2012 11:31:54 +0100 | ||
| 4 | |||
| 5 | --- | ||
| 6 | configure | 2 -- | ||
| 7 | 1 file changed, 2 deletions(-) | ||
| 8 | |||
| 9 | diff --git a/configure b/configure | ||
| 10 | index 1f1ef32..392fb76 100755 | ||
| 11 | --- a/configure | ||
| 12 | +++ b/configure | ||
| 13 | @@ -11642,8 +11642,6 @@ $as_echo "#define HAVE_LIBNSL 1" >>confdefs.h | ||
| 14 | |||
| 15 | |||
| 16 | |||
| 17 | - unset ac_cv_func_dlopen | ||
| 18 | - unset ac_cv_func___dlopen | ||
| 19 | unset found | ||
| 20 | |||
| 21 | ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" | ||
diff --git a/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch new file mode 100644 index 0000000000..7be67ea94d --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch | |||
| @@ -0,0 +1,387 @@ | |||
| 1 | From fafcfac0933c17e1bf551600080eb0541186caf5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
| 3 | Date: Mon, 2 Apr 2018 17:54:52 +0800 | ||
| 4 | Subject: [PATCH] opcache/config.m4: enable opcache | ||
| 5 | |||
| 6 | We can't use AC_TRY_RUN to run programs in a cross compile environment. Set | ||
| 7 | the variables directly instead since we know that we'd be running on latest | ||
| 8 | enough linux kernel. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [Configuration] | ||
| 11 | |||
| 12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 13 | |||
| 14 | %% original patch: php5-0001-opcache-config.m4-enable-opcache.patch | ||
| 15 | --- | ||
| 16 | ext/opcache/config.m4 | 349 ++------------------------------------------------ | ||
| 17 | 1 file changed, 8 insertions(+), 341 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 | ||
| 20 | index 5a8b86c..6e87fa5 100644 | ||
| 21 | --- a/ext/opcache/config.m4 | ||
| 22 | +++ b/ext/opcache/config.m4 | ||
| 23 | @@ -11,353 +11,20 @@ if test "$PHP_OPCACHE" != "no"; then | ||
| 24 | AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) | ||
| 25 | ]) | ||
| 26 | |||
| 27 | - AC_MSG_CHECKING(for sysvipc shared memory support) | ||
| 28 | - AC_TRY_RUN([ | ||
| 29 | -#include <sys/types.h> | ||
| 30 | -#include <sys/wait.h> | ||
| 31 | -#include <sys/ipc.h> | ||
| 32 | -#include <sys/shm.h> | ||
| 33 | -#include <unistd.h> | ||
| 34 | -#include <string.h> | ||
| 35 | + AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | ||
| 36 | |||
| 37 | -int main() { | ||
| 38 | - pid_t pid; | ||
| 39 | - int status; | ||
| 40 | - int ipc_id; | ||
| 41 | - char *shm; | ||
| 42 | - struct shmid_ds shmbuf; | ||
| 43 | + AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | ||
| 44 | |||
| 45 | - ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); | ||
| 46 | - if (ipc_id == -1) { | ||
| 47 | - return 1; | ||
| 48 | - } | ||
| 49 | + AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) | ||
| 50 | |||
| 51 | - shm = shmat(ipc_id, NULL, 0); | ||
| 52 | - if (shm == (void *)-1) { | ||
| 53 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 54 | - return 2; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { | ||
| 58 | - shmdt(shm); | ||
| 59 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 60 | - return 3; | ||
| 61 | - } | ||
| 62 | - | ||
| 63 | - shmbuf.shm_perm.uid = getuid(); | ||
| 64 | - shmbuf.shm_perm.gid = getgid(); | ||
| 65 | - shmbuf.shm_perm.mode = 0600; | ||
| 66 | - | ||
| 67 | - if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { | ||
| 68 | - shmdt(shm); | ||
| 69 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 70 | - return 4; | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 74 | - | ||
| 75 | - strcpy(shm, "hello"); | ||
| 76 | - | ||
| 77 | - pid = fork(); | ||
| 78 | - if (pid < 0) { | ||
| 79 | - return 5; | ||
| 80 | - } else if (pid == 0) { | ||
| 81 | - strcpy(shm, "bye"); | ||
| 82 | - return 6; | ||
| 83 | - } | ||
| 84 | - if (wait(&status) != pid) { | ||
| 85 | - return 7; | ||
| 86 | - } | ||
| 87 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 88 | - return 8; | ||
| 89 | - } | ||
| 90 | - if (strcmp(shm, "bye") != 0) { | ||
| 91 | - return 9; | ||
| 92 | - } | ||
| 93 | - return 0; | ||
| 94 | -} | ||
| 95 | -],dnl | ||
| 96 | - AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | ||
| 97 | - msg=yes,msg=no,msg=no) | ||
| 98 | - AC_MSG_RESULT([$msg]) | ||
| 99 | - | ||
| 100 | - AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) | ||
| 101 | - AC_TRY_RUN([ | ||
| 102 | -#include <sys/types.h> | ||
| 103 | -#include <sys/wait.h> | ||
| 104 | -#include <sys/mman.h> | ||
| 105 | -#include <unistd.h> | ||
| 106 | -#include <string.h> | ||
| 107 | - | ||
| 108 | -#ifndef MAP_ANON | ||
| 109 | -# ifdef MAP_ANONYMOUS | ||
| 110 | -# define MAP_ANON MAP_ANONYMOUS | ||
| 111 | -# endif | ||
| 112 | -#endif | ||
| 113 | -#ifndef MAP_FAILED | ||
| 114 | -# define MAP_FAILED ((void*)-1) | ||
| 115 | -#endif | ||
| 116 | - | ||
| 117 | -int main() { | ||
| 118 | - pid_t pid; | ||
| 119 | - int status; | ||
| 120 | - char *shm; | ||
| 121 | - | ||
| 122 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); | ||
| 123 | - if (shm == MAP_FAILED) { | ||
| 124 | - return 1; | ||
| 125 | - } | ||
| 126 | - | ||
| 127 | - strcpy(shm, "hello"); | ||
| 128 | - | ||
| 129 | - pid = fork(); | ||
| 130 | - if (pid < 0) { | ||
| 131 | - return 5; | ||
| 132 | - } else if (pid == 0) { | ||
| 133 | - strcpy(shm, "bye"); | ||
| 134 | - return 6; | ||
| 135 | - } | ||
| 136 | - if (wait(&status) != pid) { | ||
| 137 | - return 7; | ||
| 138 | - } | ||
| 139 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 140 | - return 8; | ||
| 141 | - } | ||
| 142 | - if (strcmp(shm, "bye") != 0) { | ||
| 143 | - return 9; | ||
| 144 | - } | ||
| 145 | - return 0; | ||
| 146 | -} | ||
| 147 | -],dnl | ||
| 148 | - AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | ||
| 149 | - msg=yes,msg=no,msg=no) | ||
| 150 | - AC_MSG_RESULT([$msg]) | ||
| 151 | - | ||
| 152 | - AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) | ||
| 153 | - AC_TRY_RUN([ | ||
| 154 | -#include <sys/types.h> | ||
| 155 | -#include <sys/wait.h> | ||
| 156 | -#include <sys/mman.h> | ||
| 157 | -#include <sys/stat.h> | ||
| 158 | -#include <fcntl.h> | ||
| 159 | -#include <unistd.h> | ||
| 160 | -#include <string.h> | ||
| 161 | - | ||
| 162 | -#ifndef MAP_FAILED | ||
| 163 | -# define MAP_FAILED ((void*)-1) | ||
| 164 | -#endif | ||
| 165 | - | ||
| 166 | -int main() { | ||
| 167 | - pid_t pid; | ||
| 168 | - int status; | ||
| 169 | - int fd; | ||
| 170 | - char *shm; | ||
| 171 | - | ||
| 172 | - fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); | ||
| 173 | - if (fd == -1) { | ||
| 174 | - return 1; | ||
| 175 | - } | ||
| 176 | - | ||
| 177 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 178 | - if (shm == MAP_FAILED) { | ||
| 179 | - return 2; | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | - strcpy(shm, "hello"); | ||
| 183 | - | ||
| 184 | - pid = fork(); | ||
| 185 | - if (pid < 0) { | ||
| 186 | - return 5; | ||
| 187 | - } else if (pid == 0) { | ||
| 188 | - strcpy(shm, "bye"); | ||
| 189 | - return 6; | ||
| 190 | - } | ||
| 191 | - if (wait(&status) != pid) { | ||
| 192 | - return 7; | ||
| 193 | - } | ||
| 194 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 195 | - return 8; | ||
| 196 | - } | ||
| 197 | - if (strcmp(shm, "bye") != 0) { | ||
| 198 | - return 9; | ||
| 199 | - } | ||
| 200 | - return 0; | ||
| 201 | -} | ||
| 202 | -],dnl | ||
| 203 | - AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) | ||
| 204 | - msg=yes,msg=no,msg=no) | ||
| 205 | - AC_MSG_RESULT([$msg]) | ||
| 206 | - | ||
| 207 | - AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) | ||
| 208 | - AC_TRY_RUN([ | ||
| 209 | -#include <sys/types.h> | ||
| 210 | -#include <sys/wait.h> | ||
| 211 | -#include <sys/mman.h> | ||
| 212 | -#include <sys/stat.h> | ||
| 213 | -#include <fcntl.h> | ||
| 214 | -#include <unistd.h> | ||
| 215 | -#include <string.h> | ||
| 216 | -#include <stdlib.h> | ||
| 217 | -#include <stdio.h> | ||
| 218 | - | ||
| 219 | -#ifndef MAP_FAILED | ||
| 220 | -# define MAP_FAILED ((void*)-1) | ||
| 221 | -#endif | ||
| 222 | - | ||
| 223 | -int main() { | ||
| 224 | - pid_t pid; | ||
| 225 | - int status; | ||
| 226 | - int fd; | ||
| 227 | - char *shm; | ||
| 228 | - char tmpname[4096]; | ||
| 229 | - | ||
| 230 | - sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); | ||
| 231 | - if (mktemp(tmpname) == NULL) { | ||
| 232 | - return 1; | ||
| 233 | - } | ||
| 234 | - fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); | ||
| 235 | - if (fd == -1) { | ||
| 236 | - return 2; | ||
| 237 | - } | ||
| 238 | - if (ftruncate(fd, 4096) < 0) { | ||
| 239 | - close(fd); | ||
| 240 | - shm_unlink(tmpname); | ||
| 241 | - return 3; | ||
| 242 | - } | ||
| 243 | - | ||
| 244 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 245 | - if (shm == MAP_FAILED) { | ||
| 246 | - return 4; | ||
| 247 | - } | ||
| 248 | - shm_unlink(tmpname); | ||
| 249 | - close(fd); | ||
| 250 | - | ||
| 251 | - strcpy(shm, "hello"); | ||
| 252 | - | ||
| 253 | - pid = fork(); | ||
| 254 | - if (pid < 0) { | ||
| 255 | - return 5; | ||
| 256 | - } else if (pid == 0) { | ||
| 257 | - strcpy(shm, "bye"); | ||
| 258 | - return 6; | ||
| 259 | - } | ||
| 260 | - if (wait(&status) != pid) { | ||
| 261 | - return 7; | ||
| 262 | - } | ||
| 263 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 264 | - return 8; | ||
| 265 | - } | ||
| 266 | - if (strcmp(shm, "bye") != 0) { | ||
| 267 | - return 9; | ||
| 268 | - } | ||
| 269 | - return 0; | ||
| 270 | -} | ||
| 271 | -],dnl | ||
| 272 | - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | ||
| 273 | - msg=yes,msg=no,msg=no) | ||
| 274 | - AC_MSG_RESULT([$msg]) | ||
| 275 | + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | ||
| 276 | |||
| 277 | AC_MSG_CHECKING(for mmap() using regular file shared memory support) | ||
| 278 | - AC_TRY_RUN([ | ||
| 279 | -#include <sys/types.h> | ||
| 280 | -#include <sys/wait.h> | ||
| 281 | -#include <sys/mman.h> | ||
| 282 | -#include <sys/stat.h> | ||
| 283 | -#include <fcntl.h> | ||
| 284 | -#include <unistd.h> | ||
| 285 | -#include <string.h> | ||
| 286 | -#include <stdlib.h> | ||
| 287 | -#include <stdio.h> | ||
| 288 | - | ||
| 289 | -#ifndef MAP_FAILED | ||
| 290 | -# define MAP_FAILED ((void*)-1) | ||
| 291 | -#endif | ||
| 292 | - | ||
| 293 | -int main() { | ||
| 294 | - pid_t pid; | ||
| 295 | - int status; | ||
| 296 | - int fd; | ||
| 297 | - char *shm; | ||
| 298 | - char tmpname[4096]; | ||
| 299 | - | ||
| 300 | - sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); | ||
| 301 | - if (mktemp(tmpname) == NULL) { | ||
| 302 | - return 1; | ||
| 303 | - } | ||
| 304 | - fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); | ||
| 305 | - if (fd == -1) { | ||
| 306 | - return 2; | ||
| 307 | - } | ||
| 308 | - if (ftruncate(fd, 4096) < 0) { | ||
| 309 | - close(fd); | ||
| 310 | - unlink(tmpname); | ||
| 311 | - return 3; | ||
| 312 | - } | ||
| 313 | - | ||
| 314 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 315 | - if (shm == MAP_FAILED) { | ||
| 316 | - return 4; | ||
| 317 | - } | ||
| 318 | - unlink(tmpname); | ||
| 319 | - close(fd); | ||
| 320 | - | ||
| 321 | - strcpy(shm, "hello"); | ||
| 322 | - | ||
| 323 | - pid = fork(); | ||
| 324 | - if (pid < 0) { | ||
| 325 | - return 5; | ||
| 326 | - } else if (pid == 0) { | ||
| 327 | - strcpy(shm, "bye"); | ||
| 328 | - return 6; | ||
| 329 | - } | ||
| 330 | - if (wait(&status) != pid) { | ||
| 331 | - return 7; | ||
| 332 | - } | ||
| 333 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 334 | - return 8; | ||
| 335 | - } | ||
| 336 | - if (strcmp(shm, "bye") != 0) { | ||
| 337 | - return 9; | ||
| 338 | - } | ||
| 339 | - return 0; | ||
| 340 | -} | ||
| 341 | -],dnl | ||
| 342 | - AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) | ||
| 343 | - msg=yes,msg=no,msg=no) | ||
| 344 | - AC_MSG_RESULT([$msg]) | ||
| 345 | - | ||
| 346 | -flock_type=unknown | ||
| 347 | -AC_MSG_CHECKING("whether flock struct is linux ordered") | ||
| 348 | -AC_TRY_RUN([ | ||
| 349 | - #include <fcntl.h> | ||
| 350 | - struct flock lock = { 1, 2, 3, 4, 5 }; | ||
| 351 | - int main() { | ||
| 352 | - if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { | ||
| 353 | - return 0; | ||
| 354 | - } | ||
| 355 | - return 1; | ||
| 356 | - } | ||
| 357 | -], [ | ||
| 358 | - flock_type=linux | ||
| 359 | - AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) | ||
| 360 | - AC_MSG_RESULT("yes") | ||
| 361 | -], AC_MSG_RESULT("no") ) | ||
| 362 | + | ||
| 363 | + AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) | ||
| 364 | |||
| 365 | -AC_MSG_CHECKING("whether flock struct is BSD ordered") | ||
| 366 | -AC_TRY_RUN([ | ||
| 367 | - #include <fcntl.h> | ||
| 368 | - struct flock lock = { 1, 2, 3, 4, 5 }; | ||
| 369 | - int main() { | ||
| 370 | - if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { | ||
| 371 | - return 0; | ||
| 372 | - } | ||
| 373 | - return 1; | ||
| 374 | - } | ||
| 375 | -], [ | ||
| 376 | - flock_type=bsd | ||
| 377 | - AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) | ||
| 378 | - AC_MSG_RESULT("yes") | ||
| 379 | -], AC_MSG_RESULT("no") ) | ||
| 380 | + flock_type=linux | ||
| 381 | + AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) | ||
| 382 | |||
| 383 | if test "$flock_type" = "unknown"; then | ||
| 384 | AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) | ||
| 385 | -- | ||
| 386 | 2.7.4 | ||
| 387 | |||
diff --git a/meta-oe/recipes-devtools/php/php_5.6.35.bb b/meta-oe/recipes-devtools/php/php_5.6.35.bb index 5ccbfa1ad9..c17c0d6a25 100644 --- a/meta-oe/recipes-devtools/php/php_5.6.35.bb +++ b/meta-oe/recipes-devtools/php/php_5.6.35.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI += "file://php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch \ | |||
| 12 | SRC_URI_append_class-target = " \ | 12 | SRC_URI_append_class-target = " \ |
| 13 | file://php5-pear-makefile.patch \ | 13 | file://php5-pear-makefile.patch \ |
| 14 | file://php5-phar-makefile.patch \ | 14 | file://php5-phar-makefile.patch \ |
| 15 | file://php5-0001-opcache-config.m4-enable-opcache.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | SRC_URI[md5sum] = "905ae5f586351f3ca29d044c9484d475" | 18 | SRC_URI[md5sum] = "905ae5f586351f3ca29d044c9484d475" |
diff --git a/meta-oe/recipes-devtools/php/php_7.2.4.bb b/meta-oe/recipes-devtools/php/php_7.2.4.bb index 1a9c8ffadc..04d9b167d5 100644 --- a/meta-oe/recipes-devtools/php/php_7.2.4.bb +++ b/meta-oe/recipes-devtools/php/php_7.2.4.bb | |||
| @@ -9,6 +9,7 @@ SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \ | |||
| 9 | SRC_URI_append_class-target = " \ | 9 | SRC_URI_append_class-target = " \ |
| 10 | file://pear-makefile.patch \ | 10 | file://pear-makefile.patch \ |
| 11 | file://phar-makefile.patch \ | 11 | file://phar-makefile.patch \ |
| 12 | file://0001-opcache-config.m4-enable-opcache.patch \ | ||
| 12 | " | 13 | " |
| 13 | 14 | ||
| 14 | SRC_URI[md5sum] = "864c64ffd2f1686b035ef8ce6a6d8478" | 15 | SRC_URI[md5sum] = "864c64ffd2f1686b035ef8ce6a6d8478" |
