From dcbdb260ff1d712fc8ca923b21455efa4eae3d35 Mon Sep 17 00:00:00 2001 From: David Jones Date: Wed, 16 Feb 2005 11:36:22 +0000 Subject: [PATCH] Mps: windows linker problem. Copied from Perforce Change: 144811 ServerID: perforce.ravenbrook.com --- mps/code/commpre.nmk | 8 +++++++- mps/code/w3i3mv.nmk | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mps/code/commpre.nmk b/mps/code/commpre.nmk index 7e6cf8abc3e..c10da3de76d 100644 --- a/mps/code/commpre.nmk +++ b/mps/code/commpre.nmk @@ -129,8 +129,14 @@ CFLAGSCOMMONPOST = $(CFLAGSTARGETPOST) # Flags for use in the variety combinations CFLAGSHOT = /Ox /DNDEBUG +# We used to have /GZ here (stack probe). # Note that GZ is specific to version 12 of the cl tool. drj 2003-11-04 -CFLAGSCOOL = /Od /GZ +# It is ignored on earlier versions of the cl tool. +# /GZ here generates a dependency on the C library and when we are +# building a DLL, mpsdy.dll, the linker step will fail (error LNK2001: +# unresolved external symbol __chkesp). See +# http://support.microsoft.com/kb/q191669/ +CFLAGSCOOL = /Od CFLAGSINTERNAL = /Zi CFLAGSEXTERNAL = diff --git a/mps/code/w3i3mv.nmk b/mps/code/w3i3mv.nmk index f3b98dbdea7..3f2c8cfce50 100644 --- a/mps/code/w3i3mv.nmk +++ b/mps/code/w3i3mv.nmk @@ -8,7 +8,10 @@ PFM = w3i3mv RAINBOWPATH = MSVISUAL\WIN32\I386 DONGLELIB = $(RAINBOWPATH)\spromeps.lib -PFMDEFS = /DWIN32 /D_WINDOWS /I$(RAINBOWPATH) +# /Gs appears to be necessary to suppress stack checks. Stack checks +# (if not suppressed) generate a dependency on the C library, __chkesp, +# which causes the linker step to fail when building the DLL, mpsdy.dll. +PFMDEFS = /DWIN32 /D_WINDOWS /Gs /I$(RAINBOWPATH) MPM = \ \