Files
MINGW-packages/mingw-w64-python3.12/0108-Add-lpython-version-while-linking-stdlib.patch
2024-09-10 08:53:36 +02:00

42 lines
1.2 KiB
Diff

From 27e0ab2d7d95e6ac95dcbc5a526534e8335d8205 Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Mon, 1 Jan 2024 14:48:28 +0530
Subject: [PATCH 108/N] Add `-lpython<version>` while linking stdlib
---
Modules/makesetup | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Modules/makesetup b/Modules/makesetup
index f000c9c..13e4149 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -88,7 +88,7 @@ NL='\
'
# Setup to link with extra libraries when making shared extensions.
-# Currently, only Cygwin needs this baggage.
+# Currently, only Cygwin and MINGW needs this baggage.
case `uname -s` in
CYGWIN*) if test $libdir = .
then
@@ -97,6 +97,9 @@ CYGWIN*) if test $libdir = .
ExtraLibDir='$(LIBPL)'
fi
ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
+MINGW*)
+ ExtraLibs='$(BLDLIBRARY)'
+ ExtraLibDepends='$(LIBRARY_DEPS)';;
esac
# Main loop
@@ -285,7 +288,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
BUILT_SHARED="$BUILT_SHARED $mod"
;;
esac
- rule="$file: $objs"
+ rule="$file: $objs $ExtraLibDepends"
rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
echo "$rule" >>$rulesf
done