From 96e547b20d31cbc834d38df004855398672b2ea7 Mon Sep 17 00:00:00 2001 From: dzou Date: Wed, 6 Apr 2022 18:32:03 +0300 Subject: [PATCH] fix build on e2k --- add-include.patch | 12 ++++++++++++ php7.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 add-include.patch diff --git a/add-include.patch b/add-include.patch new file mode 100644 index 0000000..516a35f --- /dev/null +++ b/add-include.patch @@ -0,0 +1,12 @@ +diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c +index 53efa865..d6975a44 100644 +--- a/ext/opcache/zend_accelerator_util_funcs.c ++++ b/ext/opcache/zend_accelerator_util_funcs.c +@@ -24,6 +24,7 @@ + #include "zend_accelerator_util_funcs.h" + #include "zend_persist.h" + #include "zend_shared_alloc.h" ++#include + + #if SIZEOF_SIZE_T <= SIZEOF_ZEND_LONG + /* If sizeof(void*) == sizeof(zend_ulong) we can use zend_hash index functions */ diff --git a/php7.spec b/php7.spec index d9a30ca..95f1008 100644 --- a/php7.spec +++ b/php7.spec @@ -81,6 +81,8 @@ Patch114: php-no_pam_in_c-client.diff # Fix bugs Patch121: php-bug43221.diff Patch122: php-not-use-libgd-const.patch +# fix include +Patch123: add-include.patch BuildRequires: autoconf BuildRequires: automake @@ -1271,6 +1273,7 @@ fi # upstream fixes %patch121 -p0 -b .bug43221.droplet %patch122 -p1 +%patch123 -p1 cp %{SOURCE2} maxlifetime cp %{SOURCE3} php.crond @@ -1334,6 +1337,7 @@ libtoolize --force aclocal %build +%config_update %serverbuild cp -f %{_datadir}/libtool/build-aux/config.* . @@ -1377,9 +1381,11 @@ export GD_SHARED_LIBADD="$GD_SHARED_LIBADD -lm" # -fuse-ld=gold is a workaround for a very weird bug showing with lld 9.0.1 # and php 7.4.1: "cannot apply additional memory protection after relocation" # Check if we can get rid of this after lld 10 is released. +%ifarch %{x86_64} %{ix86} %{armx} SAFE_LDFLAGS=`echo %{ldflags} -fuse-ld=gold|sed -e 's|-Wl,--no-undefined||g'` -export EXTRA_LIBS="-lz" export LDFLAGS="$SAFE_LDFLAGS" +%endif +export EXTRA_LIBS="-lz" # never use "--disable-rpath", it does the opposite