cpython: 8db7fcf6c67d (original) (raw)
Mercurial > cpython
changeset 92731:8db7fcf6c67d
- Issue #18096: Fix library order returned by python-config. [#18096]
doko@ubuntu.com | |
---|---|
date | Thu, 02 Oct 2014 02:02:45 +0200 |
parents | 301b9a58021c(current diff)b826ba76d1ce(diff) |
children | 80a515e255aa |
files | Misc/NEWS |
diffstat | 3 files changed, 6 insertions(+), 3 deletions(-)[+] [-] Misc/NEWS 2 Misc/python-config.in 5 Misc/python-config.sh.in 2 |
line wrap: on
line diff
--- 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 -----
--- 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()[](#l2.7)
libs.append('-lpython' + pyver + sys.abiflags)[](#l2.8)
libs = ['-lpython' + pyver + sys.abiflags][](#l2.9)
libs += getvar('LIBS').split()[](#l2.10)
libs += getvar('SYSLIBS').split()[](#l2.11) # add the prefix/lib/pythonX.Y/config dir, but only if there is no[](#l2.12) # shared library in prefix/lib/.[](#l2.13) if opt == '--ldflags':[](#l2.14)
--- 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−lpythonSYSLIBS -lpythonSYSLIBS−lpython{VERSION}${ABIFLAGS}" +LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" BASECFLAGS="@BASECFLAGS@" LDLIBRARY="@LDLIBRARY@" LINKFORSHARED="@LINKFORSHARED@"