I have confirmed Masayuki's patch (3.4-distutils-shlibext.patch) fixes a few build issues on Cygwin.
At its core, what it's fixing is allowing UnixCCompiler.find_library_file to find import libraries on Cygwin.
That in turn is necessary for --with-system-ffi to work, which is currently needed; on Cygwin64 at least the ffi compile as part of _ctypes fails (a separate issue to be addressed separately). But in the meantime making --with-system-ffi work again goes a long way.
It should be noted there is a patch at #18654 to make the CygwinCCompiler class work again, and switch to using it to handle Cygwin-specific build issues as origially intended. I intend to review that ticket and spend some time on it, but it's more complex and not necessarily the simplest way forward.
In the meantime this one-line patch accomplishes a fair bit.