Fix GCC 12 compilation on riscv64

Close GH-11321
This commit is contained in:
Daniil Gentili 2023-05-25 20:26:28 +02:00 committed by David Carlier
parent b5a07a7501
commit 1dfa277a96
2 changed files with 13 additions and 0 deletions

3
NEWS
View File

@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.1.21
- Core:
. Fixed build for the riscv64 architecture/GCC 12. (Daniil Gentili)
- DOM:
. Fixed bugs GH-11288 and GH-11289 and GH-11290 and GH-9142 (DOMExceptions
and segfaults with replaceWith). (nielsdos)

View File

@ -365,6 +365,16 @@ if test "$ac_cv_func_dlopen" = "yes"; then
fi
AC_CHECK_LIB(m, sin)
case $host_alias in
riscv64*)
AC_CHECK_LIB(atomic, __atomic_exchange_1, [
PHP_ADD_LIBRARY(atomic)
], [
AC_MSG_ERROR([Problem with enabling atomic. Please check config.log for details.])
])
;;
esac
dnl Check for inet_aton in -lc, -lbind and -lresolv.
PHP_CHECK_FUNC(inet_aton, resolv, bind)