File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1058,6 +1058,8 @@ Build
10581058- Issue #21166: Prevent possible segfaults and other random failures of
10591059 python --generate-posix-vars in pybuilddir.txt build target.
10601060
1061+ - Issue #18096: Fix library order returned by python-config.
1062+
10611063C API
10621064-----
10631065
Original file line number Diff line number Diff line change @@ -47,8 +47,9 @@ for opt in opt_flags:
4747 print (' ' .join (flags ))
4848
4949 elif opt in ('--libs' , '--ldflags' ):
50- libs = getvar ('LIBS' ).split () + getvar ('SYSLIBS' ).split ()
51- libs .append ('-lpython' + pyver + sys .abiflags )
50+ libs = ['-lpython' + pyver + sys .abiflags ]
51+ libs += getvar ('LIBS' ).split ()
52+ libs += getvar ('SYSLIBS' ).split ()
5253 # add the prefix/lib/pythonX.Y/config dir, but only if there is no
5354 # shared library in prefix/lib/.
5455 if opt == '--ldflags' :
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ LIBM="@LIBM@"
4040LIBC=" @LIBC@"
4141SYSLIBS=" $LIBM $LIBC "
4242ABIFLAGS=" @ABIFLAGS@"
43- LIBS=" @LIBS@ $SYSLIBS -lpython${VERSION}${ABIFLAGS} "
43+ LIBS=" -lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS "
4444BASECFLAGS=" @BASECFLAGS@"
4545LDLIBRARY=" @LDLIBRARY@"
4646LINKFORSHARED=" @LINKFORSHARED@"
You can’t perform that action at this time.
0 commit comments