unbit/uwsgi — pull request #313 by xtfxme (2013-06-13 21:11:11+00:00)
Title: move libs from LIBS/SYSLIBS to the end of link, eg. before libpythonX.Y.a

we are embedding all c-extensions into python core, many of which link to system libs like libz, libbz2, libxml2, libsqlite3, etc etc... and we make sure these libs are expressed in the `LIBS` var of sysconfig (which, as you probably know, is where python sticks manually added user libs during configure).

the problem is that uwsgi adds libpythonX.Y.a to the very end of the link, after all the `LIBS` and `SYSLIBS`, and is therefore unable to link correctly when using `--as-needed` linker flag.

i think this change is correct, and as reference, when python builds itself, it adds these flags *after* libpythonX.Y.a