build: use --whole-archive for pthread with --fully-static
This resolves a crash during the build of Node.js when built
with ./configure --fully-static
.
Fixes: https://github.com/nodejs/node/issues/30180
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines