Commit 6b6bcc3e authored by doko@ubuntu.com's avatar doko@ubuntu.com

- Issue #18096: Fix library order returned by python-config.

parents c383ad8d d486c43d
......@@ -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
-----
......
......@@ -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':
......
......@@ -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@"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment