File 0008-Disable-have-ipa-pure-const-bug-on-newer-gcc-compile.patch of Package mingw64-python3
From 2edc15213035765d5a409a206b59e87930571e0d Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Wed, 31 Aug 2022 16:16:57 +0200
Subject: [PATCH 08/12] Disable have ipa pure const bug on newer gcc compiler
as it has been fixed in gcc 5
---
cmake/ConfigureChecks.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index 0b022c2..ba6ace7 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -2615,7 +2615,7 @@ python_platform_test_run(
cmake_pop_check_state()
# HAVE_IPA_PURE_CONST_BUG
-if(HAVE_GCC_ASM_FOR_X87 AND CMAKE_C_COMPILER_ID MATCHES "GNU")
+if(HAVE_GCC_ASM_FOR_X87 AND CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0)
# Some versions of gcc miscompile inline asm:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
# http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
--
2.35.3