Преглед на файлове

package/php: add BR2_PACKAGE_PHP_ARCH_SUPPORTS

fiber (https://wiki.php.net/rfc/fibers) has been added in version 8.1.0
with
https://github.com/php/php-src/commit/c276c16b6627222c40bd43907475d664734b9abe

fiber uses asm on supported architectures or needs ucontext since
https://github.com/php/php-src/commit/8fd747a2a0e9f57c12bdad22a1844a736e7b4e57

As result, the following build failure is raised without ucontext_t on
architectures not supported by asm since bump to version 8.1.7 in commit
0ddfece7f7e5b10a5da89f2c462616d5deb5b1ec:

/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/10.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: Zend/zend_fibers.o: in function `zend_fiber_init_context':
zend_fibers.c:(.text+0x68a): undefined reference to `getcontext'

As fiber can't be disabled (only fiber-asm), add
BR2_PACKAGE_PHP_ARCH_SUPPORTS to reflect this new dependency

Fixes:
 - http://autobuild.buildroot.org/results/f4077bae8f879828e343475318cd2ddb99e09ba4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Fabrice Fontaine преди 3 години
родител
ревизия
37ac285cc1
променени са 1 файла, в които са добавени 14 реда и са изтрити 0 реда
  1. 14 0
      package/php/Config.in

+ 14 - 0
package/php/Config.in

@@ -1,5 +1,18 @@
+config BR2_PACKAGE_PHP_ARCH_SUPPORTS
+	bool
+	# see fiber_cpu in configure.ac
+	default y if BR2_aarch64 || BR2_aarch64_be
+	default y if BR2_arm || BR2_armeb
+	default y if BR2_i386 || BR2_x86_64
+	default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_RISCV_64
+	default y if BR2_s390x
+	default y if BR2_TOOLCHAIN_HAS_UCONTEXT
+
 config BR2_PACKAGE_PHP
 	bool "php"
+	depends on BR2_PACKAGE_PHP_ARCH_SUPPORTS
 	# PHP uses -export-dynamic, which breaks with elf2flt with a
 	# message like "ld.real: section .junk LMA [...,...] overlaps
 	# section .text LMA [...,...]"
@@ -52,5 +65,6 @@ source "package/php/Config.ext"
 endif
 
 comment "php needs a toolchain w/ wchar"
+	depends on BR2_PACKAGE_PHP_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT
 	depends on !BR2_USE_WCHAR