From 53d9d737446c3ae8d9ac67df63be759f63725d57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Fri, 19 Nov 2021 12:18:06 +0200
Subject: [PATCH 065/N] Return consistent architecture markers for python on
 mingw/armv7

---
 Lib/sysconfig/__init__.py | 2 ++
 Python/getcompiler.c      | 2 ++
 configure.ac              | 3 +++
 3 files changed, 7 insertions(+)

diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
index 06e7d16..486ada1 100644
--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -623,6 +623,8 @@ def get_platform():
                     return 'mingw_x86_64_clang'
                 if 'arm64' in sys.version.lower():
                     return 'mingw_aarch64'
+                if 'arm' in sys.version.lower():
+                    return 'mingw_armv7'
                 return 'mingw_i686_clang'
             if 'amd64' in sys.version.lower():
                 return 'mingw_x86_64'
diff --git a/Python/getcompiler.c b/Python/getcompiler.c
index 275f799..4b0b9b3 100644
--- a/Python/getcompiler.c
+++ b/Python/getcompiler.c
@@ -20,6 +20,8 @@
 #define ARCH_SUFFIX " 64 bit (AMD64)"
 #elif defined(__aarch64__)
 #define ARCH_SUFFIX " 64 bit (ARM64)"
+#elif defined(__arm__)
+#define ARCH_SUFFIX " 32 bit (ARM)"
 #else
 #define ARCH_SUFFIX " 32 bit"
 #endif
diff --git a/configure.ac b/configure.ac
index e016a13..0daf9ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6625,6 +6625,9 @@ case $host_os in
   aarch64-*-mingw*)
     PYD_PLATFORM_TAG+="mingw_aarch64"
     ;;
+  armv7-*-mingw*)
+    PYD_PLATFORM_TAG+="mingw_armv7"
+    ;;
   esac
   AC_MSG_RESULT($PYD_PLATFORM_TAG)
 esac
