diff options
9 files changed, 45 insertions, 432 deletions
diff --git a/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch deleted file mode 100644 index 5b8c76209a..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch +++ /dev/null | |||
| @@ -1,93 +0,0 @@ | |||
| 1 | From 1eeb59366d6140a799f6051fb9f57d988b81fd5b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: easyaspi314 <easyaspi314@users.noreply.github.com> | ||
| 3 | Date: Wed, 12 Apr 2023 13:33:07 +0800 | ||
| 4 | Subject: [PATCH] Change whether to inline XXH3_hashLong_withSecret to a config | ||
| 5 | option | ||
| 6 | |||
| 7 | Change whether to inline XXH3_hashLong_withSecret to a config option to fix | ||
| 8 | GCC 12 -Og. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/php/php-src/pull/11062] | ||
| 11 | |||
| 12 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
| 13 | --- | ||
| 14 | ext/hash/xxhash/xxhash.h | 35 +++++++++++++++++++++++++++++++++-- | ||
| 15 | 1 file changed, 33 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/ext/hash/xxhash/xxhash.h b/ext/hash/xxhash/xxhash.h | ||
| 18 | index b5bd2864..8e816c05 100644 | ||
| 19 | --- a/ext/hash/xxhash/xxhash.h | ||
| 20 | +++ b/ext/hash/xxhash/xxhash.h | ||
| 21 | @@ -1375,6 +1375,23 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, | ||
| 22 | */ | ||
| 23 | # define XXH_NO_INLINE_HINTS 0 | ||
| 24 | |||
| 25 | +/*! | ||
| 26 | + * @def XXH3_INLINE_SECRET | ||
| 27 | + * @brief Determines whether to inline the XXH3 withSecret code. | ||
| 28 | + * | ||
| 29 | + * When the secret size is known, the compiler can improve the performance | ||
| 30 | + * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret(). | ||
| 31 | + * | ||
| 32 | + * However, if the secret size is not known, it doesn't have any benefit. This | ||
| 33 | + * happens when xxHash is compiled into a global symbol. Therefore, if | ||
| 34 | + * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0. | ||
| 35 | + * | ||
| 36 | + * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers | ||
| 37 | + * that are *sometimes* force inline on -Og, and it is impossible to automatically | ||
| 38 | + * detect this optimization level. | ||
| 39 | + */ | ||
| 40 | +# define XXH3_INLINE_SECRET 0 | ||
| 41 | + | ||
| 42 | /*! | ||
| 43 | * @def XXH32_ENDJMP | ||
| 44 | * @brief Whether to use a jump for `XXH32_finalize`. | ||
| 45 | @@ -1439,6 +1456,15 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, | ||
| 46 | # endif | ||
| 47 | #endif | ||
| 48 | |||
| 49 | +#ifndef XXH3_INLINE_SECRET | ||
| 50 | +# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \ | ||
| 51 | + || !defined(XXH_INLINE_ALL) | ||
| 52 | +# define XXH3_INLINE_SECRET 0 | ||
| 53 | +# else | ||
| 54 | +# define XXH3_INLINE_SECRET 1 | ||
| 55 | +# endif | ||
| 56 | +#endif | ||
| 57 | + | ||
| 58 | #ifndef XXH32_ENDJMP | ||
| 59 | /* generally preferable for performance */ | ||
| 60 | # define XXH32_ENDJMP 0 | ||
| 61 | @@ -1515,6 +1541,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) | ||
| 62 | # define XXH_NO_INLINE static | ||
| 63 | #endif | ||
| 64 | |||
| 65 | +#if XXH3_INLINE_SECRET | ||
| 66 | +# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE | ||
| 67 | +#else | ||
| 68 | +# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE | ||
| 69 | +#endif | ||
| 70 | |||
| 71 | |||
| 72 | /* ************************************* | ||
| 73 | @@ -4465,7 +4496,7 @@ XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, | ||
| 74 | * so that the compiler can properly optimize the vectorized loop. | ||
| 75 | * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set. | ||
| 76 | */ | ||
| 77 | -XXH_FORCE_INLINE XXH64_hash_t | ||
| 78 | +XXH3_WITH_SECRET_INLINE XXH64_hash_t | ||
| 79 | XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, | ||
| 80 | XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) | ||
| 81 | { | ||
| 82 | @@ -5263,7 +5294,7 @@ XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, | ||
| 83 | * It's important for performance to pass @secretLen (when it's static) | ||
| 84 | * to the compiler, so that it can properly optimize the vectorized loop. | ||
| 85 | */ | ||
| 86 | -XXH_FORCE_INLINE XXH128_hash_t | ||
| 87 | +XXH3_WITH_SECRET_INLINE XXH128_hash_t | ||
| 88 | XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, | ||
| 89 | XXH64_hash_t seed64, | ||
| 90 | const void* XXH_RESTRICT secret, size_t secretLen) | ||
| 91 | -- | ||
| 92 | 2.25.1 | ||
| 93 | |||
diff --git a/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch b/meta-oe/recipes-devtools/php/php/0001-configure.ac-don-t-include-build-libtool.m4.patch index 19a8bf8e4f..fae8697fd4 100644 --- a/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch +++ b/meta-oe/recipes-devtools/php/php/0001-configure.ac-don-t-include-build-libtool.m4.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 41ef1121682c245b10df7de4b78c45baf9114c04 Mon Sep 17 00:00:00 2001 | 1 | From 6da78888b934dc10720a6e0e520536077cc2aac2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Claude Bing <cbing@cybernetics.com> | 2 | From: Claude Bing <cbing@cybernetics.com> |
| 3 | Date: Tue, 9 Nov 2021 13:03:46 -0500 | 3 | Date: Tue, 9 Nov 2021 13:03:46 -0500 |
| 4 | Subject: [PATCH 04/11] configure.ac: don't include build/libtool.m4 | 4 | Subject: [PATCH 1/5] configure.ac: don't include build/libtool.m4 |
| 5 | 5 | ||
| 6 | we delete build/libtool.m4 before do_configure, | 6 | we delete build/libtool.m4 before do_configure, |
| 7 | we will use libtool.m4 under ACLOCALDIR | 7 | we will use libtool.m4 under ACLOCALDIR |
| @@ -17,7 +17,7 @@ Signed-off-by: Claude Bing <cbing@cybernetics.com> | |||
| 17 | 1 file changed, 1 deletion(-) | 17 | 1 file changed, 1 deletion(-) |
| 18 | 18 | ||
| 19 | diff --git a/configure.ac b/configure.ac | 19 | diff --git a/configure.ac b/configure.ac |
| 20 | index 90c94323aa..161e7c3f53 100644 | 20 | index 9d79720a2..9353e2f6e 100644 |
| 21 | --- a/configure.ac | 21 | --- a/configure.ac |
| 22 | +++ b/configure.ac | 22 | +++ b/configure.ac |
| 23 | @@ -6,7 +6,6 @@ dnl ---------------------------------------------------------------------------- | 23 | @@ -6,7 +6,6 @@ dnl ---------------------------------------------------------------------------- |
diff --git a/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch deleted file mode 100644 index 009d4d650f..0000000000 --- a/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch +++ /dev/null | |||
| @@ -1,254 +0,0 @@ | |||
| 1 | From 889583912ddd7abc628f2703892ec4884db6419a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Soumya Sambu <soumya.sambu@windriver.com> | ||
| 3 | Date: Tue, 7 May 2024 08:39:16 +0000 | ||
| 4 | Subject: [PATCH 01/11] ext/opcache/config.m4: enable opcache | ||
| 5 | |||
| 6 | We can't use AC_TRY_RUN to run programs in a cross compile | ||
| 7 | environment. Set the variables directly instead since we know | ||
| 8 | that we'd be running on latest enough linux kernel. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [Configuration] | ||
| 11 | |||
| 12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 13 | |||
| 14 | update patch to version 7.4.4 | ||
| 15 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 16 | |||
| 17 | update patch to version 8.0.12 | ||
| 18 | fix issue linking with librt | ||
| 19 | Signed-off-by: Claude Bing <cbing@cybernetics.com> | ||
| 20 | |||
| 21 | update patch to version 8.1.0 | ||
| 22 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
| 23 | |||
| 24 | update patch to version 8.2.18 | ||
| 25 | Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> | ||
| 26 | --- | ||
| 27 | ext/opcache/config.m4 | 204 ++---------------------------------------- | ||
| 28 | 1 file changed, 8 insertions(+), 196 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 | ||
| 31 | index 6bf07ad3..5d645b86 100644 | ||
| 32 | --- a/ext/opcache/config.m4 | ||
| 33 | +++ b/ext/opcache/config.m4 | ||
| 34 | @@ -113,209 +113,21 @@ if test "$PHP_OPCACHE" != "no"; then | ||
| 35 | AC_CHECK_FUNCS([mprotect]) | ||
| 36 | |||
| 37 | AC_MSG_CHECKING(for sysvipc shared memory support) | ||
| 38 | - AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
| 39 | -#include <sys/types.h> | ||
| 40 | -#include <sys/wait.h> | ||
| 41 | -#include <sys/ipc.h> | ||
| 42 | -#include <sys/shm.h> | ||
| 43 | -#include <unistd.h> | ||
| 44 | -#include <string.h> | ||
| 45 | - | ||
| 46 | -int main(void) { | ||
| 47 | - pid_t pid; | ||
| 48 | - int status; | ||
| 49 | - int ipc_id; | ||
| 50 | - char *shm; | ||
| 51 | - struct shmid_ds shmbuf; | ||
| 52 | - | ||
| 53 | - ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); | ||
| 54 | - if (ipc_id == -1) { | ||
| 55 | - return 1; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - shm = shmat(ipc_id, NULL, 0); | ||
| 59 | - if (shm == (void *)-1) { | ||
| 60 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 61 | - return 2; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { | ||
| 65 | - shmdt(shm); | ||
| 66 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 67 | - return 3; | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - shmbuf.shm_perm.uid = getuid(); | ||
| 71 | - shmbuf.shm_perm.gid = getgid(); | ||
| 72 | - shmbuf.shm_perm.mode = 0600; | ||
| 73 | - | ||
| 74 | - if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { | ||
| 75 | - shmdt(shm); | ||
| 76 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 77 | - return 4; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - shmctl(ipc_id, IPC_RMID, NULL); | ||
| 81 | - | ||
| 82 | - strcpy(shm, "hello"); | ||
| 83 | - | ||
| 84 | - pid = fork(); | ||
| 85 | - if (pid < 0) { | ||
| 86 | - return 5; | ||
| 87 | - } else if (pid == 0) { | ||
| 88 | - strcpy(shm, "bye"); | ||
| 89 | - return 6; | ||
| 90 | - } | ||
| 91 | - if (wait(&status) != pid) { | ||
| 92 | - return 7; | ||
| 93 | - } | ||
| 94 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 95 | - return 8; | ||
| 96 | - } | ||
| 97 | - if (strcmp(shm, "bye") != 0) { | ||
| 98 | - return 9; | ||
| 99 | - } | ||
| 100 | - return 0; | ||
| 101 | -} | ||
| 102 | -]])],[have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no]) | ||
| 103 | - if test "$have_shm_ipc" = "yes"; then | ||
| 104 | - AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | ||
| 105 | - fi | ||
| 106 | + AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) | ||
| 107 | + have_shm_ipc=yes | ||
| 108 | AC_MSG_RESULT([$have_shm_ipc]) | ||
| 109 | |||
| 110 | AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) | ||
| 111 | - AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
| 112 | -#include <sys/types.h> | ||
| 113 | -#include <sys/wait.h> | ||
| 114 | -#include <sys/mman.h> | ||
| 115 | -#include <unistd.h> | ||
| 116 | -#include <string.h> | ||
| 117 | - | ||
| 118 | -#ifndef MAP_ANON | ||
| 119 | -# ifdef MAP_ANONYMOUS | ||
| 120 | -# define MAP_ANON MAP_ANONYMOUS | ||
| 121 | -# endif | ||
| 122 | -#endif | ||
| 123 | -#ifndef MAP_FAILED | ||
| 124 | -# define MAP_FAILED ((void*)-1) | ||
| 125 | -#endif | ||
| 126 | - | ||
| 127 | -int main(void) { | ||
| 128 | - pid_t pid; | ||
| 129 | - int status; | ||
| 130 | - char *shm; | ||
| 131 | - | ||
| 132 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); | ||
| 133 | - if (shm == MAP_FAILED) { | ||
| 134 | - return 1; | ||
| 135 | - } | ||
| 136 | - | ||
| 137 | - strcpy(shm, "hello"); | ||
| 138 | - | ||
| 139 | - pid = fork(); | ||
| 140 | - if (pid < 0) { | ||
| 141 | - return 5; | ||
| 142 | - } else if (pid == 0) { | ||
| 143 | - strcpy(shm, "bye"); | ||
| 144 | - return 6; | ||
| 145 | - } | ||
| 146 | - if (wait(&status) != pid) { | ||
| 147 | - return 7; | ||
| 148 | - } | ||
| 149 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 150 | - return 8; | ||
| 151 | - } | ||
| 152 | - if (strcmp(shm, "bye") != 0) { | ||
| 153 | - return 9; | ||
| 154 | - } | ||
| 155 | - return 0; | ||
| 156 | -} | ||
| 157 | -]])],[have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[ | ||
| 158 | - case $host_alias in | ||
| 159 | - *linux*) | ||
| 160 | - have_shm_mmap_anon=yes | ||
| 161 | - ;; | ||
| 162 | - *) | ||
| 163 | - have_shm_mmap_anon=no | ||
| 164 | - ;; | ||
| 165 | - esac | ||
| 166 | -]) | ||
| 167 | - if test "$have_shm_mmap_anon" = "yes"; then | ||
| 168 | - AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | ||
| 169 | - fi | ||
| 170 | + AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) | ||
| 171 | + have_shm_mmap_anon=yes | ||
| 172 | AC_MSG_RESULT([$have_shm_mmap_anon]) | ||
| 173 | |||
| 174 | PHP_CHECK_FUNC_LIB(shm_open, rt, root) | ||
| 175 | AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) | ||
| 176 | - AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
| 177 | -#include <sys/types.h> | ||
| 178 | -#include <sys/wait.h> | ||
| 179 | -#include <sys/mman.h> | ||
| 180 | -#include <sys/stat.h> | ||
| 181 | -#include <fcntl.h> | ||
| 182 | -#include <unistd.h> | ||
| 183 | -#include <string.h> | ||
| 184 | -#include <stdlib.h> | ||
| 185 | -#include <stdio.h> | ||
| 186 | - | ||
| 187 | -#ifndef MAP_FAILED | ||
| 188 | -# define MAP_FAILED ((void*)-1) | ||
| 189 | -#endif | ||
| 190 | - | ||
| 191 | -int main(void) { | ||
| 192 | - pid_t pid; | ||
| 193 | - int status; | ||
| 194 | - int fd; | ||
| 195 | - char *shm; | ||
| 196 | - char tmpname[4096]; | ||
| 197 | - | ||
| 198 | - sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid()); | ||
| 199 | - if (mktemp(tmpname) == NULL) { | ||
| 200 | - return 1; | ||
| 201 | - } | ||
| 202 | - fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); | ||
| 203 | - if (fd == -1) { | ||
| 204 | - return 2; | ||
| 205 | - } | ||
| 206 | - if (ftruncate(fd, 4096) < 0) { | ||
| 207 | - close(fd); | ||
| 208 | - shm_unlink(tmpname); | ||
| 209 | - return 3; | ||
| 210 | - } | ||
| 211 | - | ||
| 212 | - shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
| 213 | - if (shm == MAP_FAILED) { | ||
| 214 | - return 4; | ||
| 215 | - } | ||
| 216 | - shm_unlink(tmpname); | ||
| 217 | - close(fd); | ||
| 218 | - | ||
| 219 | - strcpy(shm, "hello"); | ||
| 220 | - | ||
| 221 | - pid = fork(); | ||
| 222 | - if (pid < 0) { | ||
| 223 | - return 5; | ||
| 224 | - } else if (pid == 0) { | ||
| 225 | - strcpy(shm, "bye"); | ||
| 226 | - return 6; | ||
| 227 | - } | ||
| 228 | - if (wait(&status) != pid) { | ||
| 229 | - return 7; | ||
| 230 | - } | ||
| 231 | - if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { | ||
| 232 | - return 8; | ||
| 233 | - } | ||
| 234 | - if (strcmp(shm, "bye") != 0) { | ||
| 235 | - return 9; | ||
| 236 | - } | ||
| 237 | - return 0; | ||
| 238 | -} | ||
| 239 | -]])],[have_shm_mmap_posix=yes],[have_shm_mmap_posix=no],[have_shm_mmap_posix=no]) | ||
| 240 | - if test "$have_shm_mmap_posix" = "yes"; then | ||
| 241 | - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | ||
| 242 | - PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) | ||
| 243 | - fi | ||
| 244 | - AC_MSG_RESULT([$have_shm_mmap_posix]) | ||
| 245 | + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) | ||
| 246 | + AC_MSG_RESULT([yes]) | ||
| 247 | + have_shm_mmap_posix=yes | ||
| 248 | + PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) | ||
| 249 | |||
| 250 | AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], | ||
| 251 | [PHP_OPCACHE_CFLAGS="$PHP_OPCACHE_CFLAGS -Wno-implicit-fallthrough"],, | ||
| 252 | -- | ||
| 253 | 2.40.0 | ||
| 254 | |||
diff --git a/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch b/meta-oe/recipes-devtools/php/php/0002-ext-phar-Makefile.frag-Fix-phar-packaging.patch index 04bd40f4ff..b2c4f8840f 100644 --- a/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch +++ b/meta-oe/recipes-devtools/php/php/0002-ext-phar-Makefile.frag-Fix-phar-packaging.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From eab5babdadea487bbbef025068c553f5ba741774 Mon Sep 17 00:00:00 2001 | 1 | From f7724d7ccd157058630e6a887798ab6d3e34c6b7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Claude Bing <cbing@cybernetics.com> | 2 | From: Claude Bing <cbing@cybernetics.com> |
| 3 | Date: Tue, 9 Nov 2021 13:07:25 -0500 | 3 | Date: Tue, 9 Nov 2021 13:07:25 -0500 |
| 4 | Subject: [PATCH 06/11] ext/phar/Makefile.frag: Fix phar packaging | 4 | Subject: [PATCH 2/5] ext/phar/Makefile.frag: Fix phar packaging |
| 5 | 5 | ||
| 6 | Inherited from OE-Classic, with some additions to fix host paths leaking | 6 | Inherited from OE-Classic, with some additions to fix host paths leaking |
| 7 | into the target package. | 7 | into the target package. |
| @@ -19,7 +19,7 @@ Signed-off-by: Claude Bing <cbing@cybernetics.com> | |||
| 19 | 1 file changed, 3 insertions(+), 14 deletions(-) | 19 | 1 file changed, 3 insertions(+), 14 deletions(-) |
| 20 | 20 | ||
| 21 | diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag | 21 | diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag |
| 22 | index 7a867dd7..4dbcafd4 100644 | 22 | index cedde76df..09d577d73 100644 |
| 23 | --- a/ext/phar/Makefile.frag | 23 | --- a/ext/phar/Makefile.frag |
| 24 | +++ b/ext/phar/Makefile.frag | 24 | +++ b/ext/phar/Makefile.frag |
| 25 | @@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar | 25 | @@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar |
| @@ -46,3 +46,6 @@ index 7a867dd7..4dbcafd4 100644 | |||
| 46 | 46 | ||
| 47 | $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc | 47 | $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc |
| 48 | -@test -d $(builddir)/phar || mkdir $(builddir)/phar | 48 | -@test -d $(builddir)/phar || mkdir $(builddir)/phar |
| 49 | -- | ||
| 50 | 2.25.1 | ||
| 51 | |||
diff --git a/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch b/meta-oe/recipes-devtools/php/php/0003-iconv-fix-detection.patch index 49fb3a5886..46505cd329 100644 --- a/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch +++ b/meta-oe/recipes-devtools/php/php/0003-iconv-fix-detection.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From a04aabc5b80371e579fbaffdd417627390d22722 Mon Sep 17 00:00:00 2001 | 1 | From 35ac74fce1a60025f8d126783b8aa7014eefdf53 Mon Sep 17 00:00:00 2001 |
| 2 | From: Claude Bing <cbing@cybernetics.com> | 2 | From: Claude Bing <cbing@cybernetics.com> |
| 3 | Date: Tue, 9 Nov 2021 13:10:33 -0500 | 3 | Date: Tue, 9 Nov 2021 13:10:33 -0500 |
| 4 | Subject: [PATCH 10/11] iconv: fix detection | 4 | Subject: [PATCH 3/5] iconv: fix detection |
| 5 | 5 | ||
| 6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
| 7 | 7 | ||
| @@ -12,23 +12,26 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
| 12 | 12 | ||
| 13 | update patch to version 8.0.12 | 13 | update patch to version 8.0.12 |
| 14 | Signed-off-by: Claude Bing <cbing@cybernetics.com> | 14 | Signed-off-by: Claude Bing <cbing@cybernetics.com> |
| 15 | |||
| 16 | update patch to version 8.4.4 | ||
| 17 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 15 | --- | 18 | --- |
| 16 | build/php.m4 | 3 ++- | 19 | build/php.m4 | 3 ++- |
| 17 | 1 file changed, 2 insertions(+), 1 deletion(-) | 20 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 18 | 21 | ||
| 19 | diff --git a/build/php.m4 b/build/php.m4 | 22 | diff --git a/build/php.m4 b/build/php.m4 |
| 20 | index 93551d9ca7..dba50825fb 100644 | 23 | index e45b22b76..1bd3ccceb 100644 |
| 21 | --- a/build/php.m4 | 24 | --- a/build/php.m4 |
| 22 | +++ b/build/php.m4 | 25 | +++ b/build/php.m4 |
| 23 | @@ -1945,7 +1945,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ | 26 | @@ -1820,7 +1820,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ |
| 24 | unset ICONV_DIR | 27 | [Define to 1 if you have the 'libiconv' function.]) |
| 25 | 28 | ||
| 26 | dnl Check libc first if no path is provided in --with-iconv. | 29 | dnl Check libc first if no path is provided in --with-iconv. |
| 27 | - if test "$PHP_ICONV" = "yes"; then | 30 | - AS_VAR_IF([PHP_ICONV], [yes], [ |
| 28 | + dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes | 31 | + dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes |
| 29 | + if test "$PHP_ICONV" != "no"; then | 32 | + AS_VAR_IF([PHP_ICONV], [no], [], [ |
| 30 | dnl Reset LIBS temporarily as it may have already been included -liconv in. | 33 | dnl Reset LIBS temporarily as it may have already been included -liconv in. |
| 31 | LIBS_save="$LIBS" | 34 | LIBS_save=$LIBS |
| 32 | LIBS= | 35 | LIBS= |
| 33 | -- | 36 | -- |
| 34 | 2.25.1 | 37 | 2.25.1 |
diff --git a/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch b/meta-oe/recipes-devtools/php/php/0004-pear-fix-Makefile.frag-for-Yocto.patch index 37752ef949..23641be2c6 100644 --- a/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch +++ b/meta-oe/recipes-devtools/php/php/0004-pear-fix-Makefile.frag-for-Yocto.patch | |||
| @@ -1,20 +1,20 @@ | |||
| 1 | From f22958b4c1348eec3bb4c0f2cbe2d22676e0ad23 Mon Sep 17 00:00:00 2001 | 1 | From 35d7d40ac49c96b7a9a19b2f6593abb9f18ade2b Mon Sep 17 00:00:00 2001 |
| 2 | From: Claude Bing <cbing@cybernetics.com> | 2 | From: Claude Bing <cbing@cybernetics.com> |
| 3 | Date: Tue, 9 Nov 2021 13:04:29 -0500 | 3 | Date: Tue, 9 Nov 2021 13:04:29 -0500 |
| 4 | Subject: [PATCH 05/11] pear: fix Makefile.frag for Yocto | 4 | Subject: [PATCH 4/5] pear: fix Makefile.frag for Yocto |
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 5 | 7 | ||
| 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
| 7 | 9 | ||
| 8 | update patch to 8.0.12 | 10 | update patch to 8.0.12 |
| 9 | Signed-off-by: Claude Bing <cbing@cybernetics.com> | 11 | Signed-off-by: Claude Bing <cbing@cybernetics.com> |
| 10 | --- | 12 | --- |
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | pear/Makefile.frag | 2 +- | 13 | pear/Makefile.frag | 2 +- |
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 15 | 15 | ||
| 16 | diff --git a/pear/Makefile.frag b/pear/Makefile.frag | 16 | diff --git a/pear/Makefile.frag b/pear/Makefile.frag |
| 17 | index 9408757a3a..69072f39e0 100644 | 17 | index 9408757a3..69072f39e 100644 |
| 18 | --- a/pear/Makefile.frag | 18 | --- a/pear/Makefile.frag |
| 19 | +++ b/pear/Makefile.frag | 19 | +++ b/pear/Makefile.frag |
| 20 | @@ -10,7 +10,7 @@ PEAR_SUFFIX = -ds a$(program_suffix) | 20 | @@ -10,7 +10,7 @@ PEAR_SUFFIX = -ds a$(program_suffix) |
diff --git a/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch b/meta-oe/recipes-devtools/php/php/0005-sapi-cli-config.m4-fix-build-directory.patch index 9776e7f6db..e551f19a48 100644 --- a/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch +++ b/meta-oe/recipes-devtools/php/php/0005-sapi-cli-config.m4-fix-build-directory.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 03aa51625e0d1aa156c2f7cd71503b1f435d35a4 Mon Sep 17 00:00:00 2001 | 1 | From 581751f8b612c381a4a7914a33bfc4130853d305 Mon Sep 17 00:00:00 2001 |
| 2 | From: Claude Bing <cbing@cybernetics.com> | 2 | From: Claude Bing <cbing@cybernetics.com> |
| 3 | Date: Tue, 9 Nov 2021 13:08:06 -0500 | 3 | Date: Tue, 9 Nov 2021 13:08:06 -0500 |
| 4 | Subject: [PATCH 07/11] sapi/cli/config.m4: fix build directory | 4 | Subject: [PATCH 5/5] sapi/cli/config.m4: fix build directory |
| 5 | 5 | ||
| 6 | Upstream-Status: Inappropriate | 6 | Upstream-Status: Inappropriate |
| 7 | 7 | ||
| @@ -10,23 +10,26 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
| 10 | 10 | ||
| 11 | update patch to version 8.0.12 | 11 | update patch to version 8.0.12 |
| 12 | Signed-off-by: Claude Bing <cbing@cybernetics.com> | 12 | Signed-off-by: Claude Bing <cbing@cybernetics.com> |
| 13 | |||
| 14 | update patch for version 8.4.4 | ||
| 15 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 13 | --- | 16 | --- |
| 14 | sapi/cli/config.m4 | 2 +- | 17 | sapi/cli/config.m4 | 2 +- |
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 | 19 | ||
| 17 | diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 | 20 | diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 |
| 18 | index d17d531683..f2f87f9164 100644 | 21 | index 76c2d64e8..0c7436fd9 100644 |
| 19 | --- a/sapi/cli/config.m4 | 22 | --- a/sapi/cli/config.m4 |
| 20 | +++ b/sapi/cli/config.m4 | 23 | +++ b/sapi/cli/config.m4 |
| 21 | @@ -47,7 +47,7 @@ if test "$PHP_CLI" != "no"; then | 24 | @@ -50,7 +50,7 @@ if test "$PHP_CLI" != "no"; then |
| 22 | esac | 25 | ]) |
| 23 | 26 | ||
| 24 | dnl Set executable for tests. | 27 | dnl Set executable for tests. |
| 25 | - PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)" | 28 | - PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)" |
| 26 | + PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php" | 29 | + PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php" |
| 27 | PHP_SUBST(PHP_EXECUTABLE) | ||
| 28 | 30 | ||
| 29 | dnl Expose to Makefile. | 31 | PHP_SUBST([PHP_EXECUTABLE]) |
| 32 | PHP_SUBST([SAPI_CLI_PATH]) | ||
| 30 | -- | 33 | -- |
| 31 | 2.25.1 | 34 | 2.25.1 |
| 32 | 35 | ||
diff --git a/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch deleted file mode 100644 index a1b93a2369..0000000000 --- a/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From c3c20db4415e0f6c4a601d6f9da1f3746a96b301 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Claude Bing <cbing@cybernetics.com> | ||
| 3 | Date: Tue, 9 Nov 2021 13:08:58 -0500 | ||
| 4 | Subject: [PATCH 08/11] ext/imap/config.m4: fix include paths | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
| 8 | |||
| 9 | update patch to version 8.0.12 | ||
| 10 | Signed-off-by: Claude Bing <cbing@cybernetics.com> | ||
| 11 | --- | ||
| 12 | ext/imap/config.m4 | 10 ++-------- | ||
| 13 | 1 file changed, 2 insertions(+), 8 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 | ||
| 16 | index 5086a312d0..0e938bd544 100644 | ||
| 17 | --- a/ext/imap/config.m4 | ||
| 18 | +++ b/ext/imap/config.m4 | ||
| 19 | @@ -122,7 +122,7 @@ if test "$PHP_IMAP" != "no"; then | ||
| 20 | PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) | ||
| 21 | AC_DEFINE(HAVE_IMAP,1,[ ]) | ||
| 22 | |||
| 23 | - for i in $PHP_IMAP /usr/local /usr; do | ||
| 24 | + for i in $PHP_IMAP $PHP_IMAP/usr /usr/local /usr; do | ||
| 25 | IMAP_INC_CHK() | ||
| 26 | el[]IMAP_INC_CHK(/include/c-client) | ||
| 27 | el[]IMAP_INC_CHK(/include/imap) | ||
| 28 | @@ -211,13 +211,7 @@ if test "$PHP_IMAP" != "no"; then | ||
| 29 | AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) | ||
| 30 | fi | ||
| 31 | |||
| 32 | - if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then | ||
| 33 | - ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 | ||
| 34 | - elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then | ||
| 35 | - ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 | ||
| 36 | - fi | ||
| 37 | - | ||
| 38 | - for lib in c-client4 c-client imap; do | ||
| 39 | + for lib in /usr/lib c-client4 c-client imap; do | ||
| 40 | IMAP_LIB=$lib | ||
| 41 | IMAP_LIB_CHK($PHP_LIBDIR) | ||
| 42 | IMAP_LIB_CHK(c-client) | ||
| 43 | -- | ||
| 44 | 2.25.1 | ||
| 45 | |||
diff --git a/meta-oe/recipes-devtools/php/php_8.2.26.bb b/meta-oe/recipes-devtools/php/php_8.4.4.bb index 1f1b91b22f..c49780a2a4 100644 --- a/meta-oe/recipes-devtools/php/php_8.2.26.bb +++ b/meta-oe/recipes-devtools/php/php_8.4.4.bb | |||
| @@ -13,17 +13,14 @@ DEPENDS:class-native = "zlib-native libxml2-native" | |||
| 13 | PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}" | 13 | PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}" |
| 14 | 14 | ||
| 15 | SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ | 15 | SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ |
| 16 | file://0004-configure.ac-don-t-include-build-libtool.m4.patch \ | 16 | file://0001-configure.ac-don-t-include-build-libtool.m4.patch \ |
| 17 | file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \ | 17 | file://0002-ext-phar-Makefile.frag-Fix-phar-packaging.patch \ |
| 18 | file://0010-iconv-fix-detection.patch \ | ||
| 19 | file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \ | ||
| 20 | " | 18 | " |
| 21 | 19 | ||
| 22 | SRC_URI:append:class-target = " \ | 20 | SRC_URI:append:class-target = " \ |
| 23 | file://0001-ext-opcache-config.m4-enable-opcache.patch \ | 21 | file://0003-iconv-fix-detection.patch \ |
| 24 | file://0005-pear-fix-Makefile.frag-for-Yocto.patch \ | 22 | file://0004-pear-fix-Makefile.frag-for-Yocto.patch \ |
| 25 | file://0007-sapi-cli-config.m4-fix-build-directory.patch \ | 23 | file://0005-sapi-cli-config.m4-fix-build-directory.patch \ |
| 26 | file://0008-ext-imap-config.m4-fix-include-paths.patch \ | ||
| 27 | file://php-fpm.conf \ | 24 | file://php-fpm.conf \ |
| 28 | file://php-fpm-apache.conf \ | 25 | file://php-fpm-apache.conf \ |
| 29 | file://70_mod_php${PHP_MAJOR_VERSION}.conf \ | 26 | file://70_mod_php${PHP_MAJOR_VERSION}.conf \ |
| @@ -32,7 +29,7 @@ SRC_URI:append:class-target = " \ | |||
| 32 | 29 | ||
| 33 | S = "${WORKDIR}/php-${PV}" | 30 | S = "${WORKDIR}/php-${PV}" |
| 34 | 31 | ||
| 35 | SRC_URI[sha256sum] = "be57c347d451c905bcb4336832a864d9928dd0e20989b872705fea0ba6476c6b" | 32 | SRC_URI[sha256sum] = "192a325fd3ca09b6c528dd6014ee07d803c3162514d4bb0d3e0981d00ac700ec" |
| 36 | 33 | ||
| 37 | CVE_STATUS_GROUPS += "CVE_STATUS_PHP" | 34 | CVE_STATUS_GROUPS += "CVE_STATUS_PHP" |
| 38 | CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." | 35 | CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." |
| @@ -74,6 +71,9 @@ EXTRA_OECONF = "--enable-mbstring \ | |||
| 74 | ${COMMON_EXTRA_OECONF} \ | 71 | ${COMMON_EXTRA_OECONF} \ |
| 75 | " | 72 | " |
| 76 | 73 | ||
| 74 | # Set these values directly to avoid AC_RUN_IFELSE which does not work in cross compilation environment | ||
| 75 | CACHED_CONFIGUREVARS += "ac_cv_php_cv_shm_ipc=yes ac_cv_php_cv_shm_mmap_anon=yes ac_cv_php_cv_shm_mmap_posix=yes" | ||
| 76 | |||
| 77 | EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no" | 77 | EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no" |
| 78 | EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no" | 78 | EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no" |
| 79 | # Needs fibers assembly implemented for rv32 | 79 | # Needs fibers assembly implemented for rv32 |
| @@ -87,7 +87,7 @@ EXTRA_OECONF:class-native = " \ | |||
| 87 | ${COMMON_EXTRA_OECONF} \ | 87 | ${COMMON_EXTRA_OECONF} \ |
| 88 | " | 88 | " |
| 89 | 89 | ||
| 90 | PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \ | 90 | PACKAGECONFIG ??= "mysql sqlite3 opcache openssl \ |
| 91 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ | 91 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ |
| 92 | " | 92 | " |
| 93 | PACKAGECONFIG:class-native = "" | 93 | PACKAGECONFIG:class-native = "" |
| @@ -107,10 +107,6 @@ PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--witho | |||
| 107 | PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2" | 107 | PACKAGECONFIG[soap] = "--enable-soap, --disable-soap, libxml2" |
| 108 | PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" | 108 | PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" |
| 109 | PACKAGECONFIG[pam] = ",,libpam" | 109 | PACKAGECONFIG[pam] = ",,libpam" |
| 110 | PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ | ||
| 111 | --with-imap-ssl=${STAGING_DIR_HOST} \ | ||
| 112 | ,--without-imap --without-imap-ssl \ | ||
| 113 | ,uw-imap" | ||
| 114 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 110 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 115 | PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache" | 111 | PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache" |
| 116 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" | 112 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" |
