Update buildroot & docker (#25)
* Update docker & buildroot * Fix * fix versions
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
Avoid gcc segmentation fault
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[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)
|
||||
@@ -0,0 +1,71 @@
|
||||
From fb1f0e17eed729204a6d5caf590715d6257dceb3 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Thu, 5 Apr 2018 22:50:00 +0200
|
||||
Subject: [PATCH] ext/xml/expat_compat.h: add missing php.h include
|
||||
|
||||
When expat support is disabled and libxml support is enabled, the
|
||||
following part of the code in expat_compat.h gets used:
|
||||
|
||||
and therefore "php".h" is included. However, when libexpat support is
|
||||
enabled, HAVE_LIBEXPAT is defined, and therefore the following part of
|
||||
the code is used:
|
||||
|
||||
In this case, "php.h" is not included. Due to this, zend_alloc.h is
|
||||
never included when building the ext/xmlrpc/libxmlrpc/xml_element.c
|
||||
file, and therefore the estrdup -> _estrdup macros are never defined,
|
||||
causing the following link time failure:
|
||||
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `xml_element_serialize':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:462: undefined reference to `efree'
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `xml_elem_entity_escape':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:347: undefined reference to `emalloc'
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `_xmlrpc_charHandler':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:646: undefined reference to `efree'
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `xml_elem_free_non_recurse':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:198: undefined reference to `efree'
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:199: undefined reference to `efree'
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:200: undefined reference to `efree'
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:207: undefined reference to `efree'
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `xml_elem_new':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:263: undefined reference to `ecalloc'
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `_xmlrpc_startElement':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:602: undefined reference to `estrdup'
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:607: undefined reference to `emalloc'
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:609: undefined reference to `estrdup'
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:610: undefined reference to `estrdup'
|
||||
ext/xmlrpc/libxmlrpc/xml_element.o: In function `xml_elem_free_non_recurse':
|
||||
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:211: undefined reference to `efree'
|
||||
collect2: error: ld returned 1 exit status
|
||||
make: *** [Makefile:248: sapi/cgi/php-cgi] Error 1
|
||||
|
||||
This link time failure can be produced with:
|
||||
|
||||
./configure --prefix=/usr --with-libdir=/usr/lib64 --disable-all \
|
||||
--without-pear --with-config-file-path=/etc --disable-phpdbg \
|
||||
--disable-cli --enable-cgi --disable-fpm --enable-xmlreader \
|
||||
--enable-xmlwriter --enable-libxml --enable-wddx --with-xmlrpc \
|
||||
--with-libexpat-dir=/
|
||||
|
||||
We fix it by including "php.h" in the HAVE_LIBEXPAT case.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Upstream-status: https://github.com/php/php-src/pull/3212
|
||||
---
|
||||
ext/xml/expat_compat.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h
|
||||
index ed621ab53d..29fe48a7dd 100644
|
||||
--- a/ext/xml/expat_compat.h
|
||||
+++ b/ext/xml/expat_compat.h
|
||||
@@ -154,6 +154,7 @@ PHP_XML_API const XML_Char *XML_ExpatVersion(void);
|
||||
PHP_XML_API void XML_ParserFree(XML_Parser);
|
||||
|
||||
#elif defined(HAVE_LIBEXPAT)
|
||||
+#include "php.h"
|
||||
#include <expat.h>
|
||||
#endif /* HAVE_LIBEXPAT */
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
From 923cab3a5ee112d3de44b5571e73402f1fa3d619 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Mon, 26 Feb 2018 19:06:40 +0100
|
||||
Subject: [PATCH] ext/sockets: make AI_IDN usage optional
|
||||
|
||||
AI_IDN is not supported by all C libraries (uClibc, musl), so make it
|
||||
optional, like AI_ALL.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Upstream-status: https://github.com/php/php-src/pull/3160
|
||||
---
|
||||
ext/sockets/config.m4 | 13 +++++++++++++
|
||||
ext/sockets/sockets.c | 2 +-
|
||||
2 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4
|
||||
index fe7d22a10a..2bf6a2bd11 100644
|
||||
--- a/ext/sockets/config.m4
|
||||
+++ b/ext/sockets/config.m4
|
||||
@@ -69,6 +69,19 @@ if test "$PHP_SOCKETS" != "no"; then
|
||||
AC_DEFINE(HAVE_AI_ALL,1,[Whether you have AI_ALL])
|
||||
fi
|
||||
|
||||
+ dnl Check for AI_IDN flag
|
||||
+ AC_CACHE_CHECK([if getaddrinfo supports AI_IDN],[ac_cv_gai_ai_idn],
|
||||
+ [
|
||||
+ AC_TRY_COMPILE([
|
||||
+#include <netdb.h>
|
||||
+ ], [int flag = AI_IDN;],
|
||||
+ ac_cv_gai_ai_idn=yes, ac_cv_gai_ai_idn=no)
|
||||
+ ])
|
||||
+
|
||||
+ if test "$ac_cv_gai_ai_idn" = yes; then
|
||||
+ AC_DEFINE(HAVE_AI_IDN,1,[Whether you have AI_IDN])
|
||||
+ fi
|
||||
+
|
||||
PHP_NEW_EXTENSION([sockets], [sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c], [$ext_shared],, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
||||
PHP_INSTALL_HEADERS([ext/sockets/], [php_sockets.h])
|
||||
fi
|
||||
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
|
||||
index 6db56c2816..ee9651ce09 100644
|
||||
--- a/ext/sockets/sockets.c
|
||||
+++ b/ext/sockets/sockets.c
|
||||
@@ -796,7 +796,7 @@ static PHP_MINIT_FUNCTION(sockets)
|
||||
REGISTER_LONG_CONSTANT("AI_ALL", AI_ALL, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_LONG_CONSTANT("AI_ADDRCONFIG", AI_ADDRCONFIG, CONST_CS | CONST_PERSISTENT);
|
||||
-#ifdef __USE_GNU
|
||||
+#if defined(HAVE_AI_IDN) && defined(__USE_GNU)
|
||||
REGISTER_LONG_CONSTANT("AI_IDN", AI_IDN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("AI_CANONIDN", AI_CANONIDN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("AI_IDN_ALLOW_UNASSIGNED", AI_IDN_ALLOW_UNASSIGNED, CONST_CS | CONST_PERSISTENT);
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
From b7bbdfbcb0869b5c068143d4e27bab9eac4ae72b Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
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 <thomas.petazzoni@bootlin.com>
|
||||
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
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
config BR2_PACKAGE_PHP
|
||||
bool "php"
|
||||
# PHP uses -export-dynamic, which breaks with elf2flt with a
|
||||
# message like "ld.real: section .junk LMA [...,...] overlaps
|
||||
# section .text LMA [...,...]"
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
select BR2_PACKAGE_PHP_SAPI_CGI if \
|
||||
!BR2_PACKAGE_PHP_SAPI_APACHE && \
|
||||
!BR2_PACKAGE_PHP_SAPI_CLI && \
|
||||
!BR2_PACKAGE_PHP_SAPI_FPM && \
|
||||
BR2_USE_MMU
|
||||
select BR2_PACKAGE_PHP_SAPI_CLI if !BR2_USE_MMU
|
||||
# PHP uses -export-dynamic, which breaks with elf2flt with a
|
||||
# message like "ld.real: section .junk LMA [...,...] overlaps
|
||||
# section .text LMA [...,...]"
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
help
|
||||
PHP is a widely-used general-purpose scripting
|
||||
language that is especially suited for Web development
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# From http://php.net/downloads.php
|
||||
sha256 b3a94f1b562f413c0b96f54bc309706d83b29ac65d9b172bc7ed9fb40a5e651f php-7.2.3.tar.xz
|
||||
sha256 af70a33b3f7a51510467199b39af151333fbbe4cc21923bad9c7cf64268cddb2 php-7.2.5.tar.xz
|
||||
|
||||
# License file
|
||||
sha256 00e567a8d50359d93ee1f9afdd9511277660c1e70a0cbf3229f84403aa9aebb1 LICENSE
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PHP_VERSION = 7.2.3
|
||||
PHP_VERSION = 7.2.5
|
||||
PHP_SITE = http://www.php.net/distributions
|
||||
PHP_SOURCE = php-$(PHP_VERSION).tar.xz
|
||||
PHP_INSTALL_STAGING = YES
|
||||
@@ -228,10 +228,6 @@ ifneq ($(BR2_PACKAGE_PHP_EXT_MYSQLI)$(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),)
|
||||
PHP_CONF_OPTS += --with-mysql-sock=$(MYSQL_SOCKET)
|
||||
endif
|
||||
|
||||
define PHP_DISABLE_PCRE_JIT
|
||||
$(SED) '/^#define SUPPORT_JIT/d' $(@D)/ext/pcre/pcrelib/config.h
|
||||
endef
|
||||
|
||||
define PHP_DISABLE_VALGRIND
|
||||
$(SED) '/^#define HAVE_VALGRIND/d' $(@D)/main/php_config.h
|
||||
endef
|
||||
@@ -249,8 +245,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
|
||||
PHP_CFLAGS += -DSLJIT_SINGLE_THREADED=1
|
||||
endif
|
||||
# check ext/pcre/pcrelib/sljit/sljitConfigInternal.h for supported archs
|
||||
ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),)
|
||||
PHP_POST_CONFIGURE_HOOKS += PHP_DISABLE_PCRE_JIT
|
||||
ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),y)
|
||||
PHP_CONF_OPTS += --with-pcre-jit
|
||||
else
|
||||
PHP_CONF_OPTS += --without-pcre-jit
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user