Commit 7e0c574e authored by Noah Misch's avatar Noah Misch

MSVC 2012+: Permit linking to 32-bit, MinGW-built libraries.

Notably, this permits linking to the 32-bit Perl binaries advertised on
perl.org, namely Strawberry Perl and ActivePerl.  This has a side effect
of permitting linking to binaries built with obsolete MSVC versions.

By default, MSVC 2012 and later require a "safe exception handler table"
in each binary.  MinGW-built, 32-bit DLLs lack the relevant exception
handler metadata, so linking to them failed with error LNK2026.  Restore
the semantics of MSVC 2010, which omits the table from a given binary if
some linker input lacks metadata.  This has no effect on 64-bit builds
or on MSVC 2010 and earlier.  Back-patch to 9.3 (all supported
versions).

Reported by Victor Wagner.

Discussion: https://postgr.es/m/20160326154321.7754ab8f@wagner.wagner.home
parent 65a00f30
...@@ -320,6 +320,8 @@ sub WriteItemDefinitionGroup ...@@ -320,6 +320,8 @@ sub WriteItemDefinitionGroup
<GenerateMapFile>false</GenerateMapFile> <GenerateMapFile>false</GenerateMapFile>
<MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName> <MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
<RandomizedBaseAddress>false</RandomizedBaseAddress> <RandomizedBaseAddress>false</RandomizedBaseAddress>
<!-- Permit links to MinGW-built, 32-bit DLLs (default before VS2012). -->
<ImageHasSafeExceptionHandlers/>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<TargetMachine>$targetmachine</TargetMachine> <TargetMachine>$targetmachine</TargetMachine>
EOF EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment