bpo-14527: fix (some) _ctypes liffi build problems by rupertnash · Pull Request #20451 · python/cpython (original) (raw)
That is a reasonable question.
The true answer is that while making my changes I tried to keep them as small as practical.
However when I came here to respond, I notice that this library search checks for libffi and libffi_pic, whether or not pkg-config is available on the compilation host.
If we simply create a new configure variable with say:
LIBFFI_LIBNAME="`"$PKG_CONFIG" libffi --libs-only-l 2> /dev/null | sed -e 's/^-l//;s/ *$//'`"
then we will lose the ability to find libffi_pic.{so,a}
if there's no pkg-config.
We could set a default like LIBFFI_LIBNAME="ffi ffi_pic"
and then have setup.py split it's value on space before looping much as now...
My feeling is to stick as we are, but happy to defer to core team