]> git.pld-linux.org Git - packages/php.git/commitdiff
- partial fix for x32 build
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 24 Oct 2018 21:02:33 +0000 (23:02 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 24 Oct 2018 21:02:33 +0000 (23:02 +0200)
php.spec
x32.patch [new file with mode: 0644]

index 26e69c160e01b43d09500ec3f21fdd0156595ca2..687f7a084d1916f7677d77e677097dd5684f703d 100644 (file)
--- 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 (file)
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;
This page took 1.031191 seconds and 4 git commands to generate.