Skip to content

Commit 3f4028d

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Fix GH-15587: Autotools: fix configure check for aarch64 CRC32 API
2 parents fefa7d8 + 5c44610 commit 3f4028d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

configure.ac

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,19 @@ AC_FUNC_ALLOCA
696696
PHP_TIME_R_TYPE
697697

698698
AC_CACHE_CHECK([for aarch64 CRC32 API], [php_cv_func___crc32d],
699-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <arm_acle.h>], [__crc32d(0, 0);])],
699+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
700+
#include <arm_acle.h>
701+
# if defined(__GNUC__)
702+
# if!defined(__clang__)
703+
# pragma GCC push_options
704+
# pragma GCC target ("+nothing+crc")
705+
# elif defined(__APPLE__)
706+
# pragma clang attribute push(__attribute__((target("crc"))), apply_to=function)
707+
# else
708+
# pragma clang attribute push(__attribute__((target("+nothing+crc"))), apply_to=function)
709+
# endif
710+
# endif
711+
], [__crc32d(0, 0);])],
700712
[php_cv_func___crc32d=yes],
701713
[php_cv_func___crc32d=no])])
702714
AS_VAR_IF([php_cv_func___crc32d], [yes],

0 commit comments

Comments
 (0)