Skip to content

Autotools: fix configure check for aarch64 CRC32 API #15587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,19 @@ AC_FUNC_ALLOCA
PHP_TIME_R_TYPE

AC_CACHE_CHECK([for aarch64 CRC32 API], [php_cv_func___crc32d],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <arm_acle.h>], [__crc32d(0, 0);])],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <arm_acle.h>
# if defined(__GNUC__)
# if!defined(__clang__)
# pragma GCC push_options
# pragma GCC target ("+nothing+crc")
# elif defined(__APPLE__)
# pragma clang attribute push(__attribute__((target("crc"))), apply_to=function)
# else
# pragma clang attribute push(__attribute__((target("+nothing+crc"))), apply_to=function)
# endif
# endif
], [__crc32d(0, 0);])],
[php_cv_func___crc32d=yes],
[php_cv_func___crc32d=no])])
AS_VAR_IF([php_cv_func___crc32d], [yes],
Expand Down
Loading