Skip to content

Commit ae5ca54

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix lcov genhtml: ERROR: cannot read [file] Properly detect CRC32 APIs on aarch64 from configure
2 parents a4cc9d8 + ae1d4a8 commit ae5ca54

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

build/Makefile.gcov

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ LCOV_EXCLUDES = \
1414
'$(top_srcdir)/ext/mbstring/libmbfl/*' \
1515
'$(top_srcdir)/ext/opcache/jit/libudis86/*' \
1616
'$(top_srcdir)/ext/pcre/pcre2lib/*' \
17-
'$(top_srcdir)/ext/xmlrpc/libxmlrpc/*'
17+
'$(top_srcdir)/ext/xmlrpc/libxmlrpc/*' \
18+
'$(top_srcdir)/parse_date.re' \
19+
'$(top_srcdir)/parse_iso_intervals.re'
1820

1921
GCOVR_EXCLUDES = \
2022
'ext/bcmath/libbcmath/.*' \

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,12 @@ if test "x$php_crypt_r" = "x1"; then
668668
PHP_CRYPT_R_STYLE
669669
fi
670670

671+
AC_CACHE_CHECK([for aarch64 CRC32 API], ac_cv_func___crc32d,
672+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <arm_acle.h>]],[[__crc32d(0, 0);]])],[ac_cv_func___crc32d=yes],[ac_cv_func___crc32d="no"])])
673+
if test "$ac_cv_func___crc32d" = "yes"; then
674+
AC_DEFINE([HAVE_AARCH64_CRC32], [1], [Define when aarch64 CRC32 API is available.])
675+
fi
676+
671677
dnl Check for asm goto support.
672678
AC_CACHE_CHECK([for asm goto], ac_cv__asm_goto,
673679
[AC_RUN_IFELSE([AC_LANG_SOURCE([[

ext/standard/crc32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "basic_functions.h"
1919
#include "crc32.h"
2020

21-
#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H)
21+
#if HAVE_AARCH64_CRC32
2222
# include <arm_acle.h>
2323
# if defined(__linux__)
2424
# include <sys/auxv.h>
@@ -83,7 +83,7 @@ PHP_FUNCTION(crc32)
8383

8484
crc = crcinit^0xFFFFFFFF;
8585

86-
#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H)
86+
#if HAVE_AARCH64_CRC32
8787
if (has_crc32_insn()) {
8888
crc = crc32_aarch64(crc, p, nr);
8989
RETURN_LONG(crc^0xFFFFFFFF);

0 commit comments

Comments
 (0)