# HG changeset patch # User tbell # Date 1224131066 25200 # Node ID 1b32e0d45be02f7c8873125a839692afe8592acd # Parent c2036bf76829c03b99108fffab52e20910a9be4f 6759959: VS2008 errors compiling corba sources Summary: Update Makefiles to deal with newer Visual Studio releases Reviewed-by: ohair diff -r c2036bf76829 -r 1b32e0d45be0 corba/make/common/Defs-windows.gmk --- a/corba/make/common/Defs-windows.gmk Wed Jul 05 16:42:03 2017 +0200 +++ b/corba/make/common/Defs-windows.gmk Wed Oct 15 21:24:26 2008 -0700 @@ -58,11 +58,24 @@ # 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 @@ 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 @@ # -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 @@ # -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 -r c2036bf76829 -r 1b32e0d45be0 corba/make/common/shared/Compiler-msvc.gmk --- a/corba/make/common/shared/Compiler-msvc.gmk Wed Jul 05 16:42:03 2017 +0200 +++ b/corba/make/common/shared/Compiler-msvc.gmk Wed Oct 15 21:24:26 2008 -0700 @@ -47,24 +47,17 @@ # 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 @@ 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 @@ 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))