aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authortbell <none@none>2008-10-15 21:24:26 -0700
committertbell <none@none>2008-10-15 21:24:26 -0700
commite852a2066e7cfecdfaddc4e6eeb849b39441312a (patch)
treedf4bd885ae5f0ced5f7c987e8fffc430e13cf032 /make
parent4059811cf0cdf935b690a967557a894802e98d0d (diff)
6759959: VS2008 errors compiling corba sources
Summary: Update Makefiles to deal with newer Visual Studio releases Reviewed-by: ohair
Diffstat (limited to 'make')
-rw-r--r--make/common/Defs-windows.gmk35
-rw-r--r--make/common/shared/Compiler-msvc.gmk40
2 files changed, 54 insertions, 21 deletions
diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk
index c5de04c..aa863f6 100644
--- a/make/common/Defs-windows.gmk
+++ b/make/common/Defs-windows.gmk
@@ -58,11 +58,24 @@ PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# The following DLL's are considered MS runtime libraries and should
# not to be REBASEd, see deploy/make/common/Release.gmk.
-# msvcrt.dll, msvcr71.dll: Microsoft runtimes
+# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
MS_RUNTIME_LIBRARIES = msvcrt.dll
+MSVCRNN_DLL =
ifeq ($(ARCH_DATA_MODEL), 32)
ifeq ($(COMPILER_VERSION), VS2003)
- MS_RUNTIME_LIBRARIES += msvcr71.dll
+ MSVCRNN_DLL = msvcr71.dll
+ MSVCPNN_DLL = msvcp71.dll
+ MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
+ endif
+ ifeq ($(COMPILER_VERSION), VS2005)
+ MSVCRNN_DLL = msvcr80.dll
+ MSVCPNN_DLL = msvcp80.dll
+ MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
+ endif
+ ifeq ($(COMPILER_VERSION), VS2008)
+ MSVCRNN_DLL = msvcr90.dll
+ MSVCPNN_DLL = msvcp90.dll
+ MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
endif
@@ -148,6 +161,20 @@ ifeq ($(CC_VERSION),msvc)
CC_LOWER_OPT = -O1
endif
endif
+ ifeq ($(COMPILER_VERSION), VS2008)
+ # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
+ AUTOMATIC_PCH_OPTION =
+ GX_OPTION = -EHsc
+ ifeq ($(ARCH_DATA_MODEL), 32)
+ CC_HIGHEST_OPT = -O2
+ CC_HIGHER_OPT = -O1
+ CC_LOWER_OPT = -O1
+ else
+ CC_HIGHEST_OPT = -O2
+ CC_HIGHER_OPT = -O1
+ CC_LOWER_OPT = -O1
+ endif
+ endif
CC_NO_OPT = -Od
else # CC_VERSION
# GCC not supported, but left for historical reference...
@@ -179,7 +206,7 @@ endif
# -MTd Use static debug version (better than -MDd, no runtime issues)
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
-# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcp71.dll
+# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
#
ifeq ($(MS_RUNTIME_STATIC),true)
MS_RUNTIME_OPTION=-MT
@@ -217,7 +244,7 @@ ifeq ($(CC_VERSION),msvc)
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
# -nologo Don't print out startup message
# /D _STATIC_CPPLIB
- # Use static link for the C++ runtime (so msvcp71.dll not needed)
+ # Use static link for the C++ runtime (so msvcpnn.dll not needed)
#
CFLAGS_COMMON += -Zi -nologo
CFLAGS_OPT = $(POPT)
diff --git a/make/common/shared/Compiler-msvc.gmk b/make/common/shared/Compiler-msvc.gmk
index fbb8e8a..e42dce9 100644
--- a/make/common/shared/Compiler-msvc.gmk
+++ b/make/common/shared/Compiler-msvc.gmk
@@ -47,24 +47,17 @@ ifeq ($(PLATFORM), windows)
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
+ # Compiler version and type (Always get word after "Version")
+ CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
+
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
ifeq ($(ARCH_DATA_MODEL), 32)
- CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}')
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
- CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}')
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
- REQUIRED_CCTYPE = Optimizing
- REQUIRED_CC_VER = 13.10.3077
- REQUIRED_LINK_VER = 7.10.3077
- ifeq ($(CC_MAJORVER), 12)
- # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
- COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
- COMPILER_VERSION=VC6
- REBASE = $(COMPILER_PATH)rebase
- MTL = $(COMPILER_PATH)midl
- endif
ifeq ($(CC_MAJORVER), 13)
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
+ REQUIRED_CC_VER = 13.10.3077
+ REQUIRED_LINK_VER = 7.10.3077
COMPILER_NAME=Visual Studio .NET 2003 Professional C++
COMPILER_VERSION=VS2003
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
@@ -74,9 +67,10 @@ ifeq ($(PLATFORM), windows)
endif
endif
ifeq ($(CC_MAJORVER), 14)
- # This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000
- # NOTE: This compiler has not been tried yet on 32bit systems
- COMPILER_NAME=Visual Studio .NET 2005
+ # This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
+ REQUIRED_CC_VER = 14.00.50727.42
+ REQUIRED_LINK_VER = 8.00.50727.42
+ COMPILER_NAME=Visual Studio 8
COMPILER_VERSION=VS2005
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
@@ -84,10 +78,22 @@ ifeq ($(PLATFORM), windows)
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
+ ifeq ($(CC_MAJORVER), 15)
+ # This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
+ REQUIRED_CC_VER = 15.00.21022.08
+ REQUIRED_LINK_VER = 9.00.21022.08
+ COMPILER_NAME=Visual Studio 9
+ COMPILER_VERSION=VS2008
+ #rebase and midl moved out of Visual Studio into the SDK:
+ REBASE = $(MSDEVTOOLS_PATH)/rebase
+ MTL = $(MSDEVTOOLS_PATH)/midl.exe
+ ifndef COMPILER_PATH
+ COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
+ endif
+ endif
else
- CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}')
+ # else ARCH_DATA_MODEL is 64
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
- CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$4}')
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
CC_MINORVER :=$(call MinorVersion,$(CC_VER))
CC_MICROVER :=$(call MicroVersion,$(CC_VER))