aboutsummaryrefslogtreecommitdiff
path: root/lang/php8
diff options
context:
space:
mode:
authorMichael Heimpold <mhei@heimpold.de>2021-02-04 23:17:17 +0100
committerMichael Heimpold <mhei@heimpold.de>2021-02-04 23:47:52 +0100
commit0119aa5280d9c4d9a619f408fea3671726462682 (patch)
tree09b4dd077eda7ed85c6af7611af1847799922a9a /lang/php8
parentd8a1db00b0a6e790316f6430a4b276c4c0ee1651 (diff)
php8: fix cross-compiling for x86_64
The build process uses a minilua helper for code generation which must not be compiled with target cross-compiler but the host compiler. This error was spotted by buildbots: ext/opcache/minilua /builder/shared-workdir/build/sdk/build_dir/ target-x86_64_musl/php-8.0.1/ext/opcache/jit/dynasm/dynasm.lua -D X64=1 -o ext/opcache/jit/zend_jit_x86.c /builder/shared-workdir /build/sdk/build_dir/target-x86_64_musl/php-8.0.1/ext/opcache/jit/zend_jit_x86.dasc /bin/bash: ext/opcache/minilua: No such file or directory Makefile:406: recipe for target 'ext/opcache/jit/zend_jit_x86.c' failed make[4]: *** [ext/opcache/jit/zend_jit_x86.c] Error 127 Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Diffstat (limited to 'lang/php8')
-rw-r--r--lang/php8/Makefile3
-rw-r--r--lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch25
2 files changed, 28 insertions, 0 deletions
diff --git a/lang/php8/Makefile b/lang/php8/Makefile
index 3c5048f42..9076ff3e7 100644
--- a/lang/php8/Makefile
+++ b/lang/php8/Makefile
@@ -466,6 +466,9 @@ CONFIGURE_VARS+= \
ac_cv_u8t_decompose=yes \
ac_cv_have_pcre2_jit=no
+MAKE_VARS+= \
+ HOSTCC="$(HOSTCC)"
+
define Package/php8/conffiles
/etc/php.ini
/etc/php8/
diff --git a/lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch b/lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch
new file mode 100644
index 000000000..cbabf9197
--- /dev/null
+++ b/lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch
@@ -0,0 +1,25 @@
+From 73ea1d44c1e6b063bfa02e12919ec8a9de3709d8 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Wed, 3 Feb 2021 22:51:34 +0100
+Subject: [PATCH] Fix opcache jit minilua compiling
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+---
+ ext/opcache/jit/Makefile.frag | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/opcache/jit/Makefile.frag b/ext/opcache/jit/Makefile.frag
+index d4f97de..7421897 100644
+--- a/ext/opcache/jit/Makefile.frag
++++ b/ext/opcache/jit/Makefile.frag
+@@ -1,6 +1,6 @@
+
+ $(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
+- $(CC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@
++ $(HOSTCC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@
+
+ $(builddir)/jit/zend_jit_x86.c: $(srcdir)/jit/zend_jit_x86.dasc $(srcdir)/jit/dynasm/*.lua $(builddir)/minilua
+ $(builddir)/minilua $(srcdir)/jit/dynasm/dynasm.lua $(DASM_FLAGS) -o $@ $(srcdir)/jit/zend_jit_x86.dasc
+--
+2.17.1
+