On Windows/arm64, with the MSVC compiler, the gl_HOST_CPU_C_ABI macro
sets HOST_CPU to 'armhf' instead of 'arm64'.

This patch fixes it.


2026-11-18  Bruno Haible  <[email protected]>

        host-cpu-c-abi: Add support for MSVC on Windows/arm64.
        * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Test _M_ARM64.

diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
index 23661f4f48..884f0ee092 100644
--- a/m4/host-cpu-c-abi.m4
+++ b/m4/host-cpu-c-abi.m4
@@ -1,5 +1,5 @@
 # host-cpu-c-abi.m4
-# serial 20
+# serial 21
 dnl Copyright (C) 2002-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI]
          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or 
armhf.
          AC_COMPILE_IFELSE(
            [AC_LANG_SOURCE(
-              [[#ifdef __aarch64__
+              [[#if defined __aarch64__ || defined _M_ARM64
                  int ok;
                 #else
                  error fail




Reply via email to