summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2014-10-02 00:02:45 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2014-10-02 00:02:45 (GMT)
commit6b6bcc3e21b14c6de93e5cae68f78a86ecb8e1c9 (patch)
treedb8264aa33a32f8d5ae929d220dc4338c4a91b27 /Misc
parentc383ad8d9c3a7866ea27667f14ffa99f18e905a3 (diff)
parentd486c43d8d5ddf6d8c31e37fa5525aac7b960059 (diff)
downloadcpython-6b6bcc3e21b14c6de93e5cae68f78a86ecb8e1c9.zip
cpython-6b6bcc3e21b14c6de93e5cae68f78a86ecb8e1c9.tar.gz
cpython-6b6bcc3e21b14c6de93e5cae68f78a86ecb8e1c9.tar.bz2
- Issue #18096: Fix library order returned by python-config.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS2
-rw-r--r--Misc/python-config.in5
-rw-r--r--Misc/python-config.sh.in2
3 files changed, 6 insertions, 3 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 97899c9..afc9f65 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1058,6 +1058,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.
+
C API
-----
diff --git a/Misc/python-config.in b/Misc/python-config.in
index 0b9b5dc..e13da75 100644
--- a/Misc/python-config.in
+++ b/Misc/python-config.in
@@ -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':
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index f5a3dbe..64c81e5 100644
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -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@"