[Python-checkins] cpython (merge 3.4 -> default): - Issue #18096: Fix library order returned by python-config.

matthias.klose python-checkins at python.org
Thu Oct 2 02:03:04 CEST 2014


https://hg.python.org/cpython/rev/8db7fcf6c67d
changeset: 92731:8db7fcf6c67d
parent: 92728:301b9a58021c
parent: 92730:b826ba76d1ce
user: doko at ubuntu.com
date: Thu Oct 02 02:02:45 2014 +0200
summary:
 - Issue #18096: Fix library order returned by python-config.
files:
 Misc/NEWS | 2 ++
 Misc/python-config.in | 5 +++--
 Misc/python-config.sh.in | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1058,6 +1058,8 @@
 - 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
--- a/Misc/python-config.in
+++ b/Misc/python-config.in
@@ -47,8 +47,9 @@
 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
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -40,7 +40,7 @@
 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@"
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /