Skip to content

Commit e7742a8

Browse files
committed
php8.2: fix aarch64-musl build
1 parent 5971908 commit e7742a8

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
The configure script assumes off64_t is available when cross-compiling,
2+
which is only true for our old musl versions for armv{6,7}l.
3+
Instead of assuming or depending on running the script, change
4+
it to a test that checks whether it compiles.
5+
--- a/build/php.m4
6+
+++ b/build/php.m4
7+
@@ -1431,7 +1431,7 @@
8+
have_fopen_cookie=yes
9+
10+
dnl Even newer glibcs have a different seeker definition.
11+
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
12+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
13+
#define _GNU_SOURCE
14+
#include <stdio.h>
15+
#include <stdlib.h>
16+
@@ -1464,16 +1464,6 @@
17+
cookie_io_functions_use_off64_t=yes
18+
], [
19+
cookie_io_functions_use_off64_t=no
20+
-], [
21+
- dnl Cross compilation.
22+
- case $host_alias in
23+
- *linux*)
24+
- cookie_io_functions_use_off64_t=yes
25+
- ;;
26+
- *)
27+
- cookie_io_functions_use_off64_t=no
28+
- ;;
29+
- esac
30+
])
31+
32+
else

srcpkgs/php8.2/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ do_build() {
139139
# cgi,cli,embed,fcgi,fpm
140140
mkdir -p build
141141
cd build
142-
ln -s ${wrksrc}/configure
142+
ln -sf ${wrksrc}/configure
143143
./configure ${_phpconfig} \
144144
--host=${XBPS_CROSS_TRIPLET} \
145145
--enable-cgi \

0 commit comments

Comments
 (0)