]> granicus.if.org Git - python/commitdiff
- Issue #18096: Fix library order returned by python-config.
authordoko@ubuntu.com <doko@ubuntu.com>
Thu, 2 Oct 2014 00:00:14 +0000 (02:00 +0200)
committerdoko@ubuntu.com <doko@ubuntu.com>
Thu, 2 Oct 2014 00:00:14 +0000 (02:00 +0200)
Misc/NEWS
Misc/python-config.in
Misc/python-config.sh.in

index 182032afa9a94cf434a24835a043751c2e12a49a..ffb852f27476d5eedfa2e8437dde70bcb3fc5f16 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -38,6 +38,8 @@ Build
 - Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
   Jonathan Hosmer.
 
+- Issue #18096: Fix library order returned by python-config.
+
 
 What's New in Python 3.4.2?
 ===========================
index 0b9b5dc4413f628d88e93fc71d08ab20b29e4355..e13da7543c9ffb9c8fba9c60610e3e365e5c480a 100644 (file)
@@ -47,8 +47,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 + sys.abiflags)
+        libs = ['-lpython' + pyver + sys.abiflags]
+        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':
index f5a3dbebeaa22be20d4951aae5d07a3464826ef1..64c81e5f74b272e13627b3213d3daa1b1209fa89 100644 (file)
@@ -40,7 +40,7 @@ LIBM="@LIBM@"
 LIBC="@LIBC@"
 SYSLIBS="$LIBM $LIBC"
 ABIFLAGS="@ABIFLAGS@"
-LIBS="@LIBS@ $SYSLIBS -lpython${VERSION}${ABIFLAGS}"
+LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS"
 BASECFLAGS="@BASECFLAGS@"
 LDLIBRARY="@LDLIBRARY@"
 LINKFORSHARED="@LINKFORSHARED@"