MINGW-packages/mingw-w64-python3.13/0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.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

45 lines
1.2 KiB
Diff

From adc032c600c036ec88f7d9e046a6336a87966819 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:51:18 +0530
Subject: [PATCH 007/N] Add `PC/` to `CPPFLAGS` and to `SRCDIRS` on Mingw
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
---
configure.ac | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/configure.ac b/configure.ac
index c1ad49c..ca21358 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7198,6 +7198,16 @@ do
THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
done
+case $host in
+ *-*-mingw*)
+ dnl Required for windows builds as Objects/exceptions.c require
+ dnl "errmap.h" from $srcdir/PC.
+ dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h
+ dnl has to be before customized located in ../PC.
+ CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS"
+ ;;
+esac
+
AC_SUBST([SRCDIRS])
SRCDIRS="\
Modules \
@@ -7225,6 +7235,11 @@ SRCDIRS="\
Programs \
Python \
Python/frozen_modules"
+
+case $host in
+ *-*-mingw*) SRCDIRS="$SRCDIRS PC";;
+esac
+
AC_MSG_CHECKING([for build directories])
for dir in $SRCDIRS; do
if test ! -d $dir; then