MINGW-packages/mingw-w64-python3.13/0111-gcc-make-incompatible-pointer-types-as-warning.patch
Christoph Reiter 04c9ed3700 python3.13: Add 3.13.7
* add libb2 as dep
* remove "-Wl,--large-address-aware", default now via makepkg
* remove 2to3 logic, no longer in Python
2025-09-08 22:02:30 +02:00

31 lines
1017 B
Diff

From 3330b1a8dcc4fa1af144969867fe3f98a7d5a68a Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Thu, 11 Jul 2024 13:58:20 +0530
Subject: [PATCH 111/N] gcc: make `incompatible-pointer-types` as warning
gcc 14 changed `incompatible-pointer-types` from warning to error
for now, make it as warning to avoid build failure
---
configure.ac | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configure.ac b/configure.ac
index d405b58..b35139e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2639,6 +2639,14 @@ case $GCC in
yes)
CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"
+ # GCC 14 and later error out with incompatible-pointer-types
+ # this only occues on mingw
+ case $host in
+ *-*-mingw*)
+ CFLAGS_NODIST="$CFLAGS_NODIST -Wno-error=incompatible-pointer-types"
+ ;;
+ esac
+
PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra])
AS_VAR_IF([ac_cv_enable_extra_warning], [yes],
[CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"])