6482134: JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
Summary: Fix scanning of cl.exe version output, removed CC_TYPE.
Reviewed-by: tbell
--- a/jdk/make/common/shared/Compiler-gcc.gmk Mon Mar 31 17:20:48 2008 -0700
+++ b/jdk/make/common/shared/Compiler-gcc.gmk Tue Apr 01 15:14:53 2008 -0700
@@ -45,10 +45,8 @@
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
ifeq ($(ARCH_DATA_MODEL), 32)
CC_VER = UNKNOWN
- CC_TYPE = UNKNOWN
else
CC_VER = UNKNOWN
- CC_TYPE = UNKNOWN
endif
_LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1)
LINK_VER :=$(call GetVersion,"$(_LINK_VER)")
--- a/jdk/make/common/shared/Compiler-msvc.gmk Mon Mar 31 17:20:48 2008 -0700
+++ b/jdk/make/common/shared/Compiler-msvc.gmk Tue Apr 01 15:14:53 2008 -0700
@@ -47,13 +47,13 @@
# 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)
@@ -85,9 +85,7 @@
endif
endif
else
- CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}')
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))
--- a/jdk/make/common/shared/Sanity.gmk Mon Mar 31 17:20:48 2008 -0700
+++ b/jdk/make/common/shared/Sanity.gmk Tue Apr 01 15:14:53 2008 -0700
@@ -1335,7 +1335,7 @@
ifndef OPENJDK
@if [ "$(CC_CHECK)" != "same" ]; then \
$(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \
- " Specifically the $(COMPILER_NAME) $(CC_TYPE) compiler. \n " \
+ " Specifically the $(COMPILER_NAME) compiler. \n " \
" $(YOU_ARE_USING) compiler version: $(CC_VER) \n" \
" The compiler was obtained from the following location: \n" \
" $(COMPILER_PATH) \n" \