openssl/cygwin crashes when pthread APIs are called in
DllMain:
0 0x0000000000000000 in ?? ()
1 0x00000001801619bd in pthread_rwlock_wrlock (rwlock=0x800275ff0)
at /c/S/msys2-runtime-3.3/src/msys2-runtime/winsup/cygwin/thread.cc:3228
2 0x000000018019905b in _sigfe () at sigfe.s:35
3 0x00000004358490c9 in CRYPTO_THREAD_write_lock () from /usr/bin/msys-crypto-3.dll
4 0x000000043583c414 in init_thread_remove_handlers () from /usr/bin/msys-crypto-3.dll
5 0x000000043583c843 in OPENSSL_thread_stop () from /usr/bin/msys-crypto-3.dll
6 0x000000043583a953 in DllMain () from /usr/bin/msys-crypto-3.dll
It can be reliably reproduced by calling "meson test", which spawns threads for tests.
Something similar was discussed on the cygwin mailing list years ago, and it seems
nothing has changed/improved there, and with openssl v3 it always crashes:
https://cygwin.com/pipermail/cygwin/2011-March/194454.html
Let's do what corinna suggested there, skip OPENSSL_thread_stop() under cygwin.
This is a hacky workaround, but better to leak things then to crash.
* Drop 0003 patch - seems no longer to be needed
* Stop changing the default openssl config like Arch.
This re-enables the idea algo, but I couldn't find anything why it
should be disabled. Assume openssl knows what's acceptable.
* Run tests in parallel (they pass, with the patch revert workaround)
* Move man7 man pages to openssl-docs, that category gained a lot of
development related man pages, so move it away from the runtime packages.
Build for cygwin and patch the DLL names instead.
Also remove the OSNAME check in the perl scripts as I'm
not sure if perl will continue to report "msys" and we might
switch it to "cygwin" too.
While at it also re-enable makeflags, building with multiple
cores seems to work fine here, and is much faster.
All tests pass with this.
This contains the htmls docs/manpages and the level 3 man pages (API docs).
openssl is part of base and all these docs make up 7800 files, which is a third
of all files in base.
Since they are rarely needed and contain so many files I think it makes sense to split them out.
Only the ca-dir patch applied cleanly. The MSYS2 one had to be re-done,
as well as the enginesdir one (where we now completely side-step
./configure).
This will require *tons* of packages to be rebuilt, and during the
transition time the binaries will be broken because of the different
name of the .dll, unless one copies back msys-crypto-1.0.0.dll and
msys-ssl-1.0.0.dll (this is how Git for Windows handled that fragile
upgrade phase).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>