summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2022-11-27 14:03:22 +0000
committerAndrew Dunstan2022-11-27 14:03:22 +0000
commitccc59a83cd977608564a6f11ffcb2ec1773a9e94 (patch)
tree566675ddf273379f5b66fc1015900f2a861f4985
parent3274ec05c86730ff577f463e4e7b0259fb2bf684 (diff)
Fix binary mismatch for MSVC plperl vs gcc built perl libs
When loading plperl built against Strawberry perl or the msys2 ucrt perl that have been built with gcc, a binary mismatch has been encountered which looks like this: loadable library and perl binaries are mismatched (got handshake key 0000000012800080, needed 0000000012900080) To cure this we bring the handshake keys into sync by adding NO_THREAD_SAFE_LOCALE to the defines used to build plperl. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected] Backpatch to all live branches.
-rw-r--r--src/tools/msvc/Mkvcbuild.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 83a3e40425..7e52e9ad0a 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -585,6 +585,9 @@ sub mkvcbuild
# hack to prevent duplicate definitions of uid_t/gid_t
push(@perl_embed_ccflags, 'PLPERL_HAVE_UID_GID');
+ # prevent binary mismatch between MSVC built plperl and
+ # Strawberry or msys ucrt perl libraries
+ push(@perl_embed_ccflags, 'NO_THREAD_SAFE_LOCALE');
# Windows offers several 32-bit ABIs. Perl is sensitive to
# sizeof(time_t), one of the ABI dimensions. To get 32-bit time_t,