]> granicus.if.org Git - python/commitdiff
- Issue #18096: Fix library order returned by python-config.
authordoko@ubuntu.com <doko@ubuntu.com>
Wed, 1 Oct 2014 23:58:58 +0000 (01:58 +0200)
committerdoko@ubuntu.com <doko@ubuntu.com>
Wed, 1 Oct 2014 23:58:58 +0000 (01:58 +0200)
Misc/NEWS
Misc/python-config.in

index ffc6b5aba539ac0a9de38b8992df55e5325f8368..2158e6879d94ca580f87f7d28bc4203011c8d5d7 100644 (file)
--- 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
 -------
 
index ca9857a89be22e89d8d70ca931d817098b987071..9ee0fdff48a62471bd5079f544b9fa5a8ef5297b 100644 (file)
@@ -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':