From 451314111b9942c8389415f04e9017c3e3d3cb56 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 4 Nov 2019 11:32:46 +0100 Subject: Revert "Remove configure checks for supported instruction sets" This reverts commit edccf32f7f36a8bc759b9482737e0c3efcb3a005. This was reported to cause issues for as yet unknown reasons in bug #78769. As this was intended as code cleanup, revert this from 7.4 at least. May reapply it to master later. --- build/php.m4 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'build/php.m4') diff --git a/build/php.m4 b/build/php.m4 index fd37373f20..e91ef9887c 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2674,6 +2674,30 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CPU_SUPPORTS], [ [$have_builtin_cpu_supports], [Whether the compiler supports __builtin_cpu_supports]) ]) +dnl +dnl PHP_CHECK_CPU_SUPPORTS +dnl +AC_DEFUN([PHP_CHECK_CPU_SUPPORTS], [ + AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_INIT]) + AC_REQUIRE([PHP_CHECK_BUILTIN_CPU_SUPPORTS]) + have_ext_instructions=0 + if test $have_builtin_cpu_supports = 1; then + AC_MSG_CHECKING([for $1 instructions supports]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +int main() { + return __builtin_cpu_supports("$1")? 0 : 1; +} + ]])], [ + have_ext_instructions=1 + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ], [AC_MSG_RESULT([no])]) + fi + AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]), + [$have_ext_instructions], [Whether the compiler supports $1 instructions]) +]) + dnl dnl PHP_PATCH_CONFIG_HEADERS([FILE]) dnl -- cgit v1.2.1