From 30a1e2e9b59223b32dc9755bf92a8a2e54348632 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 26 Oct 2025 15:23:23 +0100 Subject: [PATCH] configure.ac: fix build lzcnt test to work on both i386 and amd64 The BUILD_LZCNT_TESTS conditional is used in both none/tests/x86/Makefile.am and none/tests/amd64/Makefile.am to check whether to build the lzcnt32 and lzcnt64 test program. However the configure test uses %rax which is only available on amd64. Use %eax instead to make sure the configure test succeeds on both i386 and amd64. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9629e24ca..0092ad2ae 100644 --- a/configure.ac +++ b/configure.ac @@ -3343,7 +3343,7 @@ AC_MSG_CHECKING([if x86/amd64 assembler supports 'lzcnt']) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ do { - __asm__ __volatile__("lzcnt %%rax,%%rax" : : : "rax"); + __asm__ __volatile__("lzcnt %%eax,%%eax" : : : "eax"); } while (0) ]])], [ ac_have_as_lzcnt=yes -- 2.47.3