From f8d35dd8eca621cc1d9bacb54ca720c0496e44f3 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Mon, 20 Oct 2008 17:31:57 +0100 Subject: Mps br/vc9: new w3i3m9 clone-platform: - w3i3m9.nmk: use commpre9.nmk (not commpre.nmk), for VC9 compiler and linker options; - w3i3m[v9].nmk: declare CONFIG_PF_... - mpstd.h: if CONFIG_PF_... is declared, check that the correct compiler really is in use. Copied from Perforce Change: 166505 ServerID: perforce.ravenbrook.com --- mps/code/mpstd.h | 25 +++++++++++++++++++++++++ mps/code/w3i3m9.nmk | 4 ++-- mps/code/w3i3mv.nmk | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) (limited to 'mps/code') diff --git a/mps/code/mpstd.h b/mps/code/mpstd.h index 152bf819206..005c8b69d56 100644 --- a/mps/code/mpstd.h +++ b/mps/code/mpstd.h @@ -81,6 +81,26 @@ #define MPS_WORD_SHIFT 5 #define MPS_PF_ALIGN 4 +/* w3i3m9 clone-platform, differs from w3i3mv only in MPS_PF_STRING + * and compiler options. + */ + +#elif defined(CONFIG_PF_W3I3M9) \ + || defined(_MSC_VER) && (_MSC_VER >= 1500) && defined(_WIN32) && defined(_M_IX86) +#if defined(CONFIG_PF_W3I3M9) \ + && ! ( defined(_MSC_VER) && (_MSC_VER >= 1500) && defined(_WIN32) && defined(_M_IX86) ) +#error "CONFIG_PF_W3I3M9 inconsistent with target platform detected" +#endif +#define MPS_PF_W3I3MV +#define MPS_PF_STRING "w3i3m9" +#define MPS_OS_W3 +#define MPS_ARCH_I3 +#define MPS_BUILD_MV +#define MPS_T_WORD unsigned long +#define MPS_WORD_WIDTH 32 +#define MPS_WORD_SHIFT 5 +#define MPS_PF_ALIGN 8 + /* Visual C++ 2.0, Books Online, C/C++ Book, Preprocessor Reference, * Chapter 1: The Preprocessor, Macros, Predefined Macros. * Alignment of 4 would work, but the MS library uses 8 bytes for @@ -90,6 +110,11 @@ #elif defined(CONFIG_PF_W3I3MV) \ || defined(_MSC_VER) && defined(_WIN32) && defined(_M_IX86) +#if defined(CONFIG_PF_W3I3MV) \ + && ! ( defined(_MSC_VER) && (_MSC_VER < 1500) && defined(_WIN32) && defined(_M_IX86) ) +#error "CONFIG_PF_W3I3MV inconsistent with target platform detected" +/* (See w3i3m9 clone-platform, above) */ +#endif #define MPS_PF_W3I3MV #define MPS_PF_STRING "w3i3mv" #define MPS_OS_W3 diff --git a/mps/code/w3i3m9.nmk b/mps/code/w3i3m9.nmk index 435e5703b07..852b640f0ad 100644 --- a/mps/code/w3i3m9.nmk +++ b/mps/code/w3i3m9.nmk @@ -23,7 +23,7 @@ DONGLELIB = $(RAINBOWPATH)\spromeps.lib # /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) +PFMDEFS = /DCONFIG_PF_W3I3M9 /DWIN32 /D_WINDOWS /Gs /I$(RAINBOWPATH) MPM = \ \ @@ -54,7 +54,7 @@ POOLN = TESTLIB = -!INCLUDE commpre.nmk +!INCLUDE commpre9.nmk # Source to object file mappings and CFLAGS amalgamation diff --git a/mps/code/w3i3mv.nmk b/mps/code/w3i3mv.nmk index fc9509cd87b..daac11abd89 100644 --- a/mps/code/w3i3mv.nmk +++ b/mps/code/w3i3mv.nmk @@ -11,7 +11,7 @@ DONGLELIB = $(RAINBOWPATH)\spromeps.lib # /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) +PFMDEFS = /DCONFIG_PF_W3I3MV /DWIN32 /D_WINDOWS /Gs /I$(RAINBOWPATH) MPM = \ \ -- cgit v1.2.1