Skip to content

Commit 03acb5e

Browse files
committed
Add -lpython<version> while linking stdlib
1 parent 5ff29b0 commit 03acb5e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Modules/makesetup

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ NL='\
8888
'
8989

9090
# Setup to link with extra libraries when making shared extensions.
91-
# Currently, only Cygwin needs this baggage.
91+
# Currently, only Cygwin and MINGW needs this baggage.
9292
case `uname -s` in
9393
CYGWIN*) if test $libdir = .
9494
then
@@ -97,6 +97,9 @@ CYGWIN*) if test $libdir = .
9797
ExtraLibDir='$(LIBPL)'
9898
fi
9999
ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
100+
MINGW*)
101+
ExtraLibs='$(BLDLIBRARY)'
102+
ExtraLibDepends='$(LIBRARY_DEPS)';;
100103
esac
101104

102105
# Main loop
@@ -285,7 +288,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
285288
BUILT_SHARED="$BUILT_SHARED $mod"
286289
;;
287290
esac
288-
rule="$file: $objs"
291+
rule="$file: $objs $ExtraLibDepends"
289292
rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
290293
echo "$rule" >>$rulesf
291294
done

0 commit comments

Comments
 (0)