This backported patch is required to fix the build for loongarch64:
...
... loongarch64-openwrt-linux-musl/bin/ld.bfd: Zend/zend_fibers.o: in function `zend_fiber_init_context':
zend_fibers.c:(.text+0xb34): undefined reference to `getcontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb38): undefined reference to `getcontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb74): undefined reference to `makecontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: zend_fibers.c:(.text+0xb78): undefined reference to `makecontext'
... loongarch64-openwrt-linux-musl/bin/ld.bfd: Zend/zend_fibers.o: in function `.L170':
zend_fibers.c:(.text+0xe34): undefined reference to `swapcontext'
...
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This is an alternative approach to #24209. Instead of switching
to bundled/internal libgd, workaround the capability detection
by giving the information to the build system directly.
PHP's original approach does not work when cross-compiling,
but since it is known which features are enabled in OpenWrt's
build, we can directly enable these features here, too.
This is not that future prove, but should do the job for the
moment until a proper solution was discussed with upstream.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Preparing to update icu4c to 75.
Created a patch for build errors in php-intl.
```
In file included from /mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/unistr.h:39,
from ext/intl/intl_convertcpp.h:22,
from ext/intl/intl_convertcpp.cpp:17:
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:29: error: 'enable_if_t' in namespace 'std' does not name a template type
133 | typename = std::enable_if_t<
| ^~~~~~~~~~~
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:24: note: 'std::enable_if_t' is only available from C++14 onwards
133 | typename = std::enable_if_t<
| ^~~
/mnt/node/openwrt/staging_dir/target-aarch64_generic_musl/usr/include/unicode/stringpiece.h:133:40: error: expected '>' before '<' token
133 | typename = std::enable_if_t<
| ^
```
The FreeBSD ports patch was used as a reference.
e680bd98d3
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Most packages already use https URLs and for PHP and PECL
package downloads https is working properly.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
The initial fix was done in a2e76e497.
Later we could revert it with 5779ae4c5 since a global fix
in gcc was deployed.
But now, PHP itself applied a workaround/fix in 8.2.8,
so that we now require the initial fix again.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This reverts commit a2e76e4978.
Now that the issue is fixed on gcc side (see openwrt/openwrt@7b4a966),
we can revert this workaround here.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
The buildbots failed for the mentioned platform with the following error:
(I shortened the pathnames and broke long lines a little bit for readability)
.../lib/gcc/riscv64-openwrt-linux-musl/12.3.0/../../../../
riscv64-openwrt-linux-musl/bin/ld: Zend/zend_execute_API.o: in function `.L533':
zend_execute_API.c:(.text+0x1b1c): undefined reference to `__atomic_exchange_1'
.../riscv64-openwrt-linux-musl/bin/ld: Zend/zend_atomic.o:
in function `zend_atomic_bool_exchange':
zend_atomic.c:(.text+0xc): undefined reference to `__atomic_exchange_1'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:350: sapi/cli/php] Error 1
Inspired by the blog post[1], linking to libatomic explicitly seems to
do the trick.
[1] A RISC-V gcc pitfall revealed by a glibc update
https://blog.jiejiss.com/A-RISC-V-gcc-pitfall-revealed-by-a-glibc-update
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
As noted in the release notes of musl 1.2.4, we can use
CFLAGS to pass -D_LARGEFILE64_SOURCE to allow to keep
using LFS64 definitions (as a short-term solution).
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
See commit 5c545bdb "treewide: replace PKG_USE_MIPS16:=0 with
PKG_BUILD_FLAGS:=no-mips16" on the main repository.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Since the OpenWrt's stub libiconv implementation is now gone,
we can build against musl's internal one or the external libiconv
implementation.
This needs minor adjustements in the makefile to allow PHPs build
to choose the right path when cross-compiling.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Also update patches and remove obsolete ones.
We also need to add one to prevent mod_php to be enabled
by apxs in configuration file.
While at, remove the VARIANT setting for pecl extensions.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>