blob: 023463b4a115f79673b6efe65c8c34095c24f51e [file] [log] [blame]
diff -Naur Python-3.8.0-orig/Python/getcompiler.c Python-3.8.0/Python/getcompiler.c
--- Python-3.8.0-orig/Python/getcompiler.c 2019-10-14 16:34:47.000000000 +0300
+++ Python-3.8.0/Python/getcompiler.c 2019-10-22 10:04:17.450288900 +0300
@@ -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++]"