[packages/php/dev-7.3] - partial fix for x32 build

baggins baggins at pld-linux.org
Wed Oct 24 23:02:48 CEST 2018


commit ff24a4787509b80ab6bcaf4b7a96092b9c91de76
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Oct 24 23:02:33 2018 +0200

    - partial fix for x32 build

 php.spec  | 11 +++++++----
 x32.patch | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 4 deletions(-)
---
diff --git a/php.spec b/php.spec
index 26e69c1..687f7a0 100644
--- a/php.spec
+++ b/php.spec
@@ -222,6 +222,7 @@ Patch68:	php-mysql-ssl-context.patch
 Patch70:	mysqlnd-ssl.patch
 Patch71:	libdb-info.patch
 Patch72:	phar-hash-shared.patch
+Patch73:	x32.patch
 URL:		http://php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -2025,6 +2026,7 @@ cp -p php.ini-production php.ini
 %patch70 -p1
 %patch71 -p1
 %patch72 -p1 -b .phar-shared
+%patch73 -p1
 
 %{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
@@ -2235,16 +2237,17 @@ fi
 export PROG_SENDMAIL="/usr/lib/sendmail"
 export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP %{rpmcppflags} \
 	-I%{_includedir}/xmlrpc-epi"
-%if %{with intl}
-# icu 59+ C++ API requires C++ >= 11
-CXXFLAGS="%{rpmcxxflags} -std=c++11"
-%endif
 
 # This should be detected by configure and set there,
 # but looks like the build system is hosed on 7.3
 export CXXFLAGS="%{rpmcxxflags} -fPIC -DPIC"
 export CFLAGS="%{rpmcflags} -fPIC -DPIC"
 
+%if %{with intl}
+# icu 59+ C++ API requires C++ >= 11
+CXXFLAGS="$CXXFLAGS -std=c++11"
+%endif
+
 sapis="
 cli
 %if %{with cgi}
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..9a59ef0
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,33 @@
+--- php-7.3.0RC3/Zend/zend_string.c~	2018-10-09 11:26:41.000000000 +0200
++++ php-7.3.0RC3/Zend/zend_string.c	2018-10-24 22:05:01.639560148 +0200
+@@ -392,7 +392,7 @@
+ }
+ #endif
+ 
+-#elif defined(__GNUC__) && defined(__x86_64__)
++#elif defined(__GNUC__) && defined(__x86_64__) && !defined(__ILP32__)
+ ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2)
+ {
+ 	char *ptr = ZSTR_VAL(s1);
+--- php-7.3.0RC3/Zend/zend_string.h~	2018-10-09 11:26:41.000000000 +0200
++++ php-7.3.0RC3/Zend/zend_string.h	2018-10-24 22:47:14.745614884 +0200
+@@ -294,7 +294,7 @@
+ 	}
+ }
+ 
+-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
++#if defined(__GNUC__) && (defined(__i386__) || (defined(__x86_64__) && !defined(__ILP32__)))
+ ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_string *s2);
+ #else
+ static zend_always_inline zend_bool zend_string_equal_val(zend_string *s1, zend_string *s2)
+--- php-7.3.0RC3/ext/opcache/zend_accelerator_util_funcs.c~	2018-10-09 11:26:32.000000000 +0200
++++ php-7.3.0RC3/ext/opcache/zend_accelerator_util_funcs.c	2018-10-24 22:15:44.849117508 +0200
+@@ -719,7 +719,7 @@
+ 		: "r"(delta)
+ 		: "cc", "memory", "%xmm0", "%xmm1", "%xmm1", "%xmm2");
+ }
+-# elif defined(__GNUC__) && defined(__x86_64__)
++# elif defined(__GNUC__) && defined(__x86_64__) && !defined(__ILP32__)
+ static zend_always_inline void fast_memcpy(void *dest, const void *src, size_t size)
+ {
+ 	size_t delta = (char*)dest - (char*)src;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/ff24a4787509b80ab6bcaf4b7a96092b9c91de76



More information about the pld-cvs-commit mailing list