From 92518cc7e3c29a3f763aa258d4191a3a8a4c4500 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Thu, 2 Oct 2014 01:58:58 +0200 Subject: - Issue #18096: Fix library order returned by python-config. --- Misc/NEWS | 2 ++ Misc/python-config.in | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index ffc6b5a..2158e68 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 ca9857a..9ee0fdf 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': -- cgit v0.12