diff options
author | atomlong | 2021-10-23 17:55:22 +0800 |
---|---|---|
committer | atomlong | 2021-10-23 18:06:15 +0800 |
commit | 80096c8de4b34ec1ed8f30bb428918cd592b2424 (patch) | |
tree | b48dd1e73de9ea35a4709fb6b93deb16331ec514 /0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch | |
parent | 89a67c05174951d172252b1db96ff93cc4ec4bcd (diff) | |
download | aur-mingw-w64-python.tar.gz |
update to 3.9.7
Diffstat (limited to '0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch')
-rw-r--r-- | 0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch b/0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch new file mode 100644 index 000000000000..27b75594704d --- /dev/null +++ b/0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch @@ -0,0 +1,42 @@ +From 887b0e7895143809d0c8170caa3a4dd2306efefd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= + <alexey.pawlow@gmail.com> +Date: Thu, 17 Jun 2021 18:52:07 +0530 +Subject: [PATCH 054/N] Add AMD64 to sys config so msvccompiler + get_build_version works + +--- + Python/getcompiler.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/Python/getcompiler.c b/Python/getcompiler.c +index 59c0dbf..adccaa7 100644 +--- a/Python/getcompiler.c ++++ b/Python/getcompiler.c +@@ -10,7 +10,22 @@ + #if defined(__clang__) + #define COMPILER "\n[Clang " __clang_version__ "]" + #elif defined(__GNUC__) +-#define COMPILER "\n[GCC " __VERSION__ "]" ++/* To not break compatibility with things that determine ++ CPU arch by calling get_build_version in msvccompiler.py ++ (such as NumPy) add "32 bit" or "64 bit (AMD64)" on Windows ++ and also use a space as a separator rather than a newline. */ ++#if defined(_WIN32) ++#define COMP_SEP " " ++#if defined(__x86_64__) ++#define ARCH_SUFFIX " 64 bit (AMD64)" ++#else ++#define ARCH_SUFFIX " 32 bit" ++#endif ++#else ++#define COMP_SEP "\n" ++#define ARCH_SUFFIX "" ++#endif ++#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]" + // Generic fallbacks. + #elif defined(__cplusplus) + #define COMPILER "[C++]" +-- +2.33.0 + |