From: Thomas Petazzoni Date: Thu, 5 Apr 2018 19:50:37 +0000 (+0200) Subject: php: remove Blackfin patch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56f39e81ac0e00a0004cdbebe0ca0e2501bbdfd9;p=buildroot.git php: remove Blackfin patch And renumber remaining patches. Signed-off-by: Thomas Petazzoni --- diff --git a/package/php/0006-Call-apxs-with-correct-prefix.patch b/package/php/0006-Call-apxs-with-correct-prefix.patch new file mode 100644 index 0000000000..c81711d2a0 --- /dev/null +++ b/package/php/0006-Call-apxs-with-correct-prefix.patch @@ -0,0 +1,51 @@ +From 4342bdea7a1a21430ce0d051fa4387441166c473 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 11 Dec 2016 23:12:46 +0100 +Subject: [PATCH] Call apxs with correct prefix + +php uses apache's apxs script from staging directory to install libphp +dynamic library and update /etc/apache2/httpd.conf in the staging and target +directories. Here is the full command line: +"apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/modules' + -S SYSCONFDIR='$(INSTALL_ROOT)/etc/apache2' -i -a -n php7" +This does not work for target directory as apxs sets the full path of the +library and not the relative one. Indeed, apxs is smart enough to substitute +away the prefix specified in $(STAGING_DIR)/usr/build/config_vars.mk so +httpd.conf will only be correct in the staging directory. +To fix this, add -S PREFIX='$(INSTALL_ROOT)/usr' to apxs call in configure + +Signed-off-by: Fabrice Fontaine +Signed-off-by: Adam Duskett +[aduskett@gmail.com: Update for 7.2.2] +--- + sapi/apache2handler/config.m4 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 +index 2e64b21..f5bf002 100644 +--- a/sapi/apache2handler/config.m4 ++++ b/sapi/apache2handler/config.m4 +@@ -66,10 +66,12 @@ if test "$PHP_APXS2" != "no"; then + AC_MSG_ERROR([Please note that Apache version >= 2.0.44 is required]) + fi + ++ APXS_PREFIX='$(INSTALL_ROOT)'/usr + APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` + if test -z `$APXS -q SYSCONFDIR`; then + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ ++ -S PREFIX='$APXS_PREFIX' \ + -i -n php7" + else + APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` +@@ -77,6 +79,7 @@ if test "$PHP_APXS2" != "no"; then + \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ + -S SYSCONFDIR='$APXS_SYSCONFDIR' \ ++ -S PREFIX='$APXS_PREFIX' \ + -i -a -n php7" + fi + +-- +2.5.0 + diff --git a/package/php/0006-avoid-bfin-gcc-segfault.patch b/package/php/0006-avoid-bfin-gcc-segfault.patch deleted file mode 100644 index 7f8cb24e7a..0000000000 --- a/package/php/0006-avoid-bfin-gcc-segfault.patch +++ /dev/null @@ -1,17 +0,0 @@ -Avoid gcc segmentation fault - -Signed-off-by: Waldemar Brodkorb -Signed-off-by: Adam Duskett -[aduskett@gmail.com: Update for 7.2.2] -diff -Nur php-7.0.12.orig/Zend/zend_portability.h php-7.0.12/Zend/zend_portability.h ---- php-7.0.12.orig/Zend/zend_portability.h 2016-10-13 16:04:17.000000000 +0200 -+++ php-7.0.12/Zend/zend_portability.h 2016-11-08 02:49:39.118388999 +0100 -@@ -95,7 +95,7 @@ - - #if defined(ZEND_WIN32) && !defined(__clang__) - # define ZEND_ASSUME(c) __assume(c) --#elif ((defined(__GNUC__) && ZEND_GCC_VERSION >= 4005) || __has_builtin(__builtin_unreachable)) && PHP_HAVE_BUILTIN_EXPECT -+#elif ((defined(__GNUC__) && ZEND_GCC_VERSION >= 4005) || __has_builtin(__builtin_unreachable)) && PHP_HAVE_BUILTIN_EXPECT && !defined(__bfin__) - # define ZEND_ASSUME(c) do { \ - if (__builtin_expect(!(c), 0)) __builtin_unreachable(); \ - } while (0) diff --git a/package/php/0007-Call-apxs-with-correct-prefix.patch b/package/php/0007-Call-apxs-with-correct-prefix.patch deleted file mode 100644 index c81711d2a0..0000000000 --- a/package/php/0007-Call-apxs-with-correct-prefix.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 4342bdea7a1a21430ce0d051fa4387441166c473 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Sun, 11 Dec 2016 23:12:46 +0100 -Subject: [PATCH] Call apxs with correct prefix - -php uses apache's apxs script from staging directory to install libphp -dynamic library and update /etc/apache2/httpd.conf in the staging and target -directories. Here is the full command line: -"apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/modules' - -S SYSCONFDIR='$(INSTALL_ROOT)/etc/apache2' -i -a -n php7" -This does not work for target directory as apxs sets the full path of the -library and not the relative one. Indeed, apxs is smart enough to substitute -away the prefix specified in $(STAGING_DIR)/usr/build/config_vars.mk so -httpd.conf will only be correct in the staging directory. -To fix this, add -S PREFIX='$(INSTALL_ROOT)/usr' to apxs call in configure - -Signed-off-by: Fabrice Fontaine -Signed-off-by: Adam Duskett -[aduskett@gmail.com: Update for 7.2.2] ---- - sapi/apache2handler/config.m4 | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 -index 2e64b21..f5bf002 100644 ---- a/sapi/apache2handler/config.m4 -+++ b/sapi/apache2handler/config.m4 -@@ -66,10 +66,12 @@ if test "$PHP_APXS2" != "no"; then - AC_MSG_ERROR([Please note that Apache version >= 2.0.44 is required]) - fi - -+ APXS_PREFIX='$(INSTALL_ROOT)'/usr - APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` - if test -z `$APXS -q SYSCONFDIR`; then - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -+ -S PREFIX='$APXS_PREFIX' \ - -i -n php7" - else - APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` -@@ -77,6 +79,7 @@ if test "$PHP_APXS2" != "no"; then - \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ - -S SYSCONFDIR='$APXS_SYSCONFDIR' \ -+ -S PREFIX='$APXS_PREFIX' \ - -i -a -n php7" - fi - --- -2.5.0 - diff --git a/package/php/0007-main-php_ini.c-build-empty-php_load_zend_extension_c.patch b/package/php/0007-main-php_ini.c-build-empty-php_load_zend_extension_c.patch new file mode 100644 index 0000000000..bc5149d1d6 --- /dev/null +++ b/package/php/0007-main-php_ini.c-build-empty-php_load_zend_extension_c.patch @@ -0,0 +1,62 @@ +From b7bbdfbcb0869b5c068143d4e27bab9eac4ae72b Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 26 Feb 2018 19:30:55 +0100 +Subject: [PATCH] main/php_ini.c: build empty php_load_zend_extension_cb() when + !HAVE_LIBDL + +Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866 +extension_dir = "./ext" now use current directory for base") modified +the php_load_zend_extension_cb() function to use php_load_shlib(), and +pass a handle to the newly introduced zend_load_extension_handle() +function instead of passing the extension path to +zend_load_extension(). + +While doing so, it introduced a call to php_load_shlib() from code +that is built even when HAVE_LIBDL is not defined. However, +php_load_shlib() is not implemented when HAVE_LIBDL is not defined, +for obvious reasons. + +It turns out that zend_load_extension_handle() anyway doesn't do +anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and +ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined +(Zend/zend_portability.h). + +Fixes the following build failure when building on a system that +doesn't have libdl: + +main/php_ini.o: In function `php_load_zend_extension_cb': +php_ini.c:(.text+0x478): undefined reference to `php_load_shlib' +php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib' +collect2: error: ld returned 1 exit status + +Signed-off-by: Thomas Petazzoni +Upstream-status: https://github.com/php/php-src/pull/3161 +--- + main/php_ini.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/main/php_ini.c b/main/php_ini.c +index ba58eb1180..fca263e5f0 100644 +--- a/main/php_ini.c ++++ b/main/php_ini.c +@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg) + + /* {{{ php_load_zend_extension_cb + */ ++#ifdef HAVE_LIBDL + static void php_load_zend_extension_cb(void *arg) + { + char *filename = *((char **) arg); +@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg) + efree(libpath); + } + } ++#else ++static void php_load_zend_extension_cb(void *arg) { } ++#endif + /* }}} */ + + /* {{{ php_init_config +-- +2.14.3 + diff --git a/package/php/0008-main-php_ini.c-build-empty-php_load_zend_extension_c.patch b/package/php/0008-main-php_ini.c-build-empty-php_load_zend_extension_c.patch deleted file mode 100644 index bc5149d1d6..0000000000 --- a/package/php/0008-main-php_ini.c-build-empty-php_load_zend_extension_c.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b7bbdfbcb0869b5c068143d4e27bab9eac4ae72b Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Mon, 26 Feb 2018 19:30:55 +0100 -Subject: [PATCH] main/php_ini.c: build empty php_load_zend_extension_cb() when - !HAVE_LIBDL - -Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866 -extension_dir = "./ext" now use current directory for base") modified -the php_load_zend_extension_cb() function to use php_load_shlib(), and -pass a handle to the newly introduced zend_load_extension_handle() -function instead of passing the extension path to -zend_load_extension(). - -While doing so, it introduced a call to php_load_shlib() from code -that is built even when HAVE_LIBDL is not defined. However, -php_load_shlib() is not implemented when HAVE_LIBDL is not defined, -for obvious reasons. - -It turns out that zend_load_extension_handle() anyway doesn't do -anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and -ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined -(Zend/zend_portability.h). - -Fixes the following build failure when building on a system that -doesn't have libdl: - -main/php_ini.o: In function `php_load_zend_extension_cb': -php_ini.c:(.text+0x478): undefined reference to `php_load_shlib' -php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib' -collect2: error: ld returned 1 exit status - -Signed-off-by: Thomas Petazzoni -Upstream-status: https://github.com/php/php-src/pull/3161 ---- - main/php_ini.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/main/php_ini.c b/main/php_ini.c -index ba58eb1180..fca263e5f0 100644 ---- a/main/php_ini.c -+++ b/main/php_ini.c -@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg) - - /* {{{ php_load_zend_extension_cb - */ -+#ifdef HAVE_LIBDL - static void php_load_zend_extension_cb(void *arg) - { - char *filename = *((char **) arg); -@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg) - efree(libpath); - } - } -+#else -+static void php_load_zend_extension_cb(void *arg) { } -+#endif - /* }}} */ - - /* {{{ php_init_config --- -2.14.3 -