Skip to content

Commit 1dfa277

Browse files
danogdevnexen
authored andcommitted
Fix GCC 12 compilation on riscv64
Close GH-11321
1 parent b5a07a7 commit 1dfa277

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.1.21
44

5+
- Core:
6+
. Fixed build for the riscv64 architecture/GCC 12. (Daniil Gentili)
7+
58
- DOM:
69
. Fixed bugs GH-11288 and GH-11289 and GH-11290 and GH-9142 (DOMExceptions
710
and segfaults with replaceWith). (nielsdos)

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,16 @@ if test "$ac_cv_func_dlopen" = "yes"; then
365365
fi
366366
AC_CHECK_LIB(m, sin)
367367

368+
case $host_alias in
369+
riscv64*)
370+
AC_CHECK_LIB(atomic, __atomic_exchange_1, [
371+
PHP_ADD_LIBRARY(atomic)
372+
], [
373+
AC_MSG_ERROR([Problem with enabling atomic. Please check config.log for details.])
374+
])
375+
;;
376+
esac
377+
368378
dnl Check for inet_aton in -lc, -lbind and -lresolv.
369379
PHP_CHECK_FUNC(inet_aton, resolv, bind)
370380

0 commit comments

Comments
 (0)