From: doko@ubuntu.com Date: Wed, 1 Oct 2014 23:58:58 +0000 (+0200) Subject: - Issue #18096: Fix library order returned by python-config. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92518cc7e3c29a3f763aa258d4191a3a8a4c4500;p=python - Issue #18096: Fix library order returned by python-config. --- diff --git a/Misc/NEWS b/Misc/NEWS index ffc6b5aba5..2158e6879d 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -242,6 +242,8 @@ Build - Issue #21166: Prevent possible segfaults and other random failures of python --generate-posix-vars in pybuilddir.txt build target. +- Issue #18096: Fix library order returned by python-config. + Windows ------- diff --git a/Misc/python-config.in b/Misc/python-config.in index ca9857a89b..9ee0fdff48 100644 --- a/Misc/python-config.in +++ b/Misc/python-config.in @@ -44,8 +44,9 @@ for opt in opt_flags: print ' '.join(flags) elif opt in ('--libs', '--ldflags'): - libs = getvar('LIBS').split() + getvar('SYSLIBS').split() - libs.append('-lpython'+pyver) + libs = ['-lpython' + pyver] + libs += getvar('LIBS').split() + libs += getvar('SYSLIBS').split() # add the prefix/lib/pythonX.Y/config dir, but only if there is no # shared library in prefix/lib/. if opt == '--ldflags':