- Issue #17086: Backport the patches from the 3.3 branch to cross-build
  the package.
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 5279411..ea6ed8a 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -51,6 +51,10 @@
             return 'win-ia64'
         return sys.platform
 
+    # Set for cross builds explicitly
+    if "_PYTHON_HOST_PLATFORM" in os.environ:
+        return os.environ["_PYTHON_HOST_PLATFORM"]
+
     if os.name != "posix" or not hasattr(os, 'uname'):
         # XXX what about the architecture? NT is Intel or Alpha,
         # Mac OS is M68k or PPC, etc.