Merge
authoriris
Mon, 13 Jul 2015 13:23:31 -0700
changeset 33962 a96fba52fc81
parent 31514 6326fbe77b26 (current diff)
parent 33961 21e31cba253a (diff)
child 33963 67bb2ab03c00
Merge
hotspot/make/jdk6_hotspot_distro
hotspot/src/share/vm/memory/universe.cpp
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/vmStructs.cpp
hotspot/src/share/vm/runtime/vm_version.cpp
hotspot/src/share/vm/runtime/vm_version.hpp
hotspot/src/share/vm/services/diagnosticCommand.cpp
hotspot/src/share/vm/services/management.cpp
--- a/hotspot/make/Makefile	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/Makefile	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -48,17 +48,14 @@
 #                             Set ALT_BUILD_WIN_SA=1 to enable building SA on
 #                             Windows.
 # Version strings and numbers:
-#  JDK_VERSION                Current JDK version (e.g. 1.6.0)
-#  PREVIOUS_JDK_VERSION       Previous (bootdir) JDK version (e.g. 1.5.0)
-#  FULL_VERSION               Full version string to use (e.g. "1.6.0-ea-b42")
-#
-# Version strings and numbers especially needed on Windows:
-#  COOKED_JDK_UPDATE_VERSION  Just the update release number (e.g. 02)
-#  COOKED_BUILD_NUMBER        Just the build number (e.g. 42)
-#  JDK_MKTG_VERSION           Marketing JDK version (e.g. 6.0)
-#  JDK_MAJOR_VERSION          Major number for version (e.g. 1) always 1?
-#  JDK_MINOR_VERSION          Minor number for version (e.g. 6)
-#  JDK_MICRO_VERSION          Micro number for version (e.g. 0)
+#  VERSION_SHORT      Current JDK version (e.g. 9.0.0)
+#  JDK_PREVIOUS_VERSION Previous (bootdir) JDK version (e.g. 1.5.0) (Only needed
+#  to facilitate standalone build.)
+#  VERSION_STRING     Full version string to use (e.g. "9.0.0-ea-b42")
+#  VERSION_MAJOR Major number for version (e.g. 9)
+#  VERSION_MINOR Minor number for version (e.g. 0)
+#  VERSION_SECURITY Security number for version (e.g. 0)
+#  VERSION_PATCH Patch number for version (e.g. 0)
 #
 
 # Default is build both product fastdebug and create export area
@@ -853,9 +850,9 @@
 	@$(ECHO) \
 "  $(MAKE) world"
 	@$(ECHO) \
-"  $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)"
+"  $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(JDK_PREVIOUS_VERSION)"
 	@$(ECHO) \
-"  $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)"
+"  $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(VERSION_STRING)"
 
 # Universal build support
 ifeq ($(OS_VENDOR), Darwin)
--- a/hotspot/make/aix/Makefile	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/aix/Makefile	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -210,7 +210,7 @@
 
 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
-BUILDTREE_VARS   += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS   += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 BUILDTREE_VARS   += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
 
 BUILDTREE         = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
--- a/hotspot/make/aix/makefiles/buildtree.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/aix/makefiles/buildtree.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -37,9 +37,8 @@
 # GAMMADIR	- top of workspace
 # OS_FAMILY	- operating system
 # VARIANT	- core, compiler1, compiler2, or tiered
-# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
-# HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
-# JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
+# VERSION_STRING - the JDK version string as specified by JEP-223
+# HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
 #
 # Builds the directory trees with makefiles plus some convenience files in
 # each directory:
@@ -132,11 +131,7 @@
 
 # Define variables to be set in flags.make.
 # Default values are set in make/defs.make.
-ifeq ($(HOTSPOT_BUILD_VERSION),)
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
-else
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
-endif
+
 # Set BUILD_USER from system-dependent hints:  $LOGNAME, $(whoami)
 ifndef HOTSPOT_BUILD_USER
   HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@@ -161,7 +156,7 @@
   endif
 endif
 
-BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION=  JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 
 BUILDTREE	= \
 	$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@@ -210,9 +205,9 @@
 	echo "BUILDARCH = $(BUILDARCH)"; \
 	echo "LIBARCH = $(LIBARCH)"; \
 	echo "TARGET = $(TARGET)"; \
-	echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
-	echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
-	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
+	echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
+	echo "VERSION_STRING = $(VERSION_STRING)"; \
+	echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
--- a/hotspot/make/aix/makefiles/defs.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/aix/makefiles/defs.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -79,102 +79,85 @@
   endif
 endif
 
-# determine if HotSpot is being built in JDK6 or earlier version
-JDK6_OR_EARLIER=0
-ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
-  # if the longer variable names (newer build style) are set, then check those
-  ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-else
-  # the longer variables aren't set so check the shorter variable names
-  ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-endif
+# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
+# builds is enabled with debug info files ZIP'ed to save space. For
+# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
+# debug build without debug info isn't very useful.
+# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a BUILD_FLAVOR == product build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
+# product build, the FULL_DEBUG_SYMBOLS environment variable will be
+# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
+# the same variable name is used, then different values can be picked
+# up by different parts of the build. Just to be clear, we only need
+# two variable names because the incoming option value can be
+# overridden in some situations, e.g., a BUILD_FLAVOR != product
+# build.
 
-ifeq ($(JDK6_OR_EARLIER),0)
-  # Full Debug Symbols is supported on JDK7 or newer.
-  # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
-  # builds is enabled with debug info files ZIP'ed to save space. For
-  # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
-  # debug build without debug info isn't very useful.
-  # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
-  #
-  # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
-  # disabled for a BUILD_FLAVOR == product build.
-  #
-  # Note: Use of a different variable name for the FDS override option
-  # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
-  # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
-  # in options via environment variables, use of distinct variables
-  # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
-  # product build, the FULL_DEBUG_SYMBOLS environment variable will be
-  # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
-  # the same variable name is used, then different values can be picked
-  # up by different parts of the build. Just to be clear, we only need
-  # two variable names because the incoming option value can be
-  # overridden in some situations, e.g., a BUILD_FLAVOR != product
-  # build.
+# Due to the multiple sub-make processes that occur this logic gets
+# executed multiple times. We reduce the noise by at least checking that
+# BUILD_FLAVOR has been set.
+ifneq ($(BUILD_FLAVOR),)
+  ifeq ($(BUILD_FLAVOR), product)
+    FULL_DEBUG_SYMBOLS ?= 1
+    ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+  else
+    # debug variants always get Full Debug Symbols (if available)
+    ENABLE_FULL_DEBUG_SYMBOLS = 1
+  endif
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-  # Due to the multiple sub-make processes that occur this logic gets
-  # executed multiple times. We reduce the noise by at least checking that
-  # BUILD_FLAVOR has been set.
-  ifneq ($(BUILD_FLAVOR),)
-    ifeq ($(BUILD_FLAVOR), product)
-      FULL_DEBUG_SYMBOLS ?= 1
-      ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    # Default OBJCOPY comes from GNU Binutils on Linux
+    ifeq ($(CROSS_COMPILE_ARCH),)
+      DEF_OBJCOPY=/usr/bin/objcopy
     else
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
+      # Assume objcopy is part of the cross-compilation toolset
+      ifneq ($(ALT_COMPILER_PATH),)
+        DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
+      endif
     endif
-    $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-    # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+    ifneq ($(ALT_OBJCOPY),)
+      $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
+      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+    endif
 
-    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-      # Default OBJCOPY comes from GNU Binutils on Linux
-      ifeq ($(CROSS_COMPILE_ARCH),)
-        DEF_OBJCOPY=/usr/bin/objcopy
-      else
-        # Assume objcopy is part of the cross-compilation toolset
-        ifneq ($(ALT_COMPILER_PATH),)
-          DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
-        endif
-      endif
-      OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-      ifneq ($(ALT_OBJCOPY),)
-        $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
-        OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-      endif
+    ifeq ($(OBJCOPY),)
+      $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
+      ENABLE_FULL_DEBUG_SYMBOLS=0
+      $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+    else
+      $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
 
-      ifeq ($(OBJCOPY),)
-        $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
-        ENABLE_FULL_DEBUG_SYMBOLS=0
-        $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-      else
-        $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
+      # Library stripping policies for .debuginfo configs:
+      #   all_strip - strips everything from the library
+      #   min_strip - strips most stuff from the library; leaves minimum symbols
+      #   no_strip  - does not strip the library at all
+      #
+      # Oracle security policy requires "all_strip". A waiver was granted on
+      # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+      #
+      # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+      #
+      STRIP_POLICY ?= min_strip
 
-        # Library stripping policies for .debuginfo configs:
-        #   all_strip - strips everything from the library
-        #   min_strip - strips most stuff from the library; leaves minimum symbols
-        #   no_strip  - does not strip the library at all
-        #
-        # Oracle security policy requires "all_strip". A waiver was granted on
-        # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-        #
-        # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
-        #
-        STRIP_POLICY ?= min_strip
+      $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+      ZIP_DEBUGINFO_FILES ?= 1
 
-        $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
-
-        ZIP_DEBUGINFO_FILES ?= 1
-
-        $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
+    endif
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 # unused JDK_INCLUDE_SUBDIR=aix
 
--- a/hotspot/make/aix/makefiles/vm.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/aix/makefiles/vm.make	Mon Jul 13 13:23:31 2015 -0700
@@ -74,12 +74,13 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/bsd/Makefile	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/bsd/Makefile	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -203,7 +203,7 @@
 
 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX)
-BUILDTREE_VARS   += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS   += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 BUILDTREE_VARS   += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
 
 BUILDTREE         = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
--- a/hotspot/make/bsd/makefiles/buildtree.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/bsd/makefiles/buildtree.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -36,9 +36,8 @@
 # GAMMADIR	- top of workspace
 # OS_FAMILY	- operating system
 # VARIANT	- core, compiler1, compiler2, or tiered
-# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
-# HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
-# JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
+# VERSION_STRING - the JDK version string as specified by JEP-223
+# HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
 #
 # Builds the directory trees with makefiles plus some convenience files in
 # each directory:
@@ -137,11 +136,7 @@
 
 # Define variables to be set in flags.make.
 # Default values are set in make/defs.make.
-ifeq ($(HOTSPOT_BUILD_VERSION),)
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
-else
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
-endif
+
 # Set BUILD_USER from system-dependent hints:  $LOGNAME, $(whoami)
 ifndef HOTSPOT_BUILD_USER
   HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@@ -166,7 +161,7 @@
   endif
 endif
 
-BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION=  JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 
 BUILDTREE	= \
 	$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@@ -216,9 +211,9 @@
 	echo "BUILDARCH = $(BUILDARCH)"; \
 	echo "LIBARCH = $(LIBARCH)"; \
 	echo "TARGET = $(TARGET)"; \
-	echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
-	echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
-	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
+	echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
+	echo "VERSION_STRING = $(VERSION_STRING)"; \
+	echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
--- a/hotspot/make/bsd/makefiles/defs.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/bsd/makefiles/defs.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -144,114 +144,97 @@
 
 OS_VENDOR:=$(shell uname -s)
 
-# determine if HotSpot is being built in JDK6 or earlier version
-JDK6_OR_EARLIER=0
-ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
-  # if the longer variable names (newer build style) are set, then check those
-  ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-else
-  # the longer variables aren't set so check the shorter variable names
-  ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-endif
+# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
+# builds is enabled with debug info files ZIP'ed to save space. For
+# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
+# debug build without debug info isn't very useful.
+# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a BUILD_FLAVOR == product build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
+# product build, the FULL_DEBUG_SYMBOLS environment variable will be
+# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
+# the same variable name is used, then different values can be picked
+# up by different parts of the build. Just to be clear, we only need
+# two variable names because the incoming option value can be
+# overridden in some situations, e.g., a BUILD_FLAVOR != product
+# build.
 
-ifeq ($(JDK6_OR_EARLIER),0)
-  # Full Debug Symbols is supported on JDK7 or newer.
-  # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
-  # builds is enabled with debug info files ZIP'ed to save space. For
-  # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
-  # debug build without debug info isn't very useful.
-  # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
-  #
-  # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
-  # disabled for a BUILD_FLAVOR == product build.
-  #
-  # Note: Use of a different variable name for the FDS override option
-  # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
-  # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
-  # in options via environment variables, use of distinct variables
-  # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
-  # product build, the FULL_DEBUG_SYMBOLS environment variable will be
-  # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
-  # the same variable name is used, then different values can be picked
-  # up by different parts of the build. Just to be clear, we only need
-  # two variable names because the incoming option value can be
-  # overridden in some situations, e.g., a BUILD_FLAVOR != product
-  # build.
-
-  # Due to the multiple sub-make processes that occur this logic gets
-  # executed multiple times. We reduce the noise by at least checking that
-  # BUILD_FLAVOR has been set.
-  ifneq ($(BUILD_FLAVOR),)
-    ifeq ($(BUILD_FLAVOR), product)
-      FULL_DEBUG_SYMBOLS ?= 1
-      ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
-    else
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
-    endif
-    $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-    # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+# Due to the multiple sub-make processes that occur this logic gets
+# executed multiple times. We reduce the noise by at least checking that
+# BUILD_FLAVOR has been set.
+ifneq ($(BUILD_FLAVOR),)
+  ifeq ($(BUILD_FLAVOR), product)
+    FULL_DEBUG_SYMBOLS ?= 1
+    ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+  else
+    # debug variants always get Full Debug Symbols (if available)
+    ENABLE_FULL_DEBUG_SYMBOLS = 1
+  endif
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-      ifeq ($(OS_VENDOR), Darwin)
-          # MacOS X doesn't use OBJCOPY or STRIP_POLICY
-          OBJCOPY=
-          STRIP_POLICY=
-          ZIP_DEBUGINFO_FILES ?= 1
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(OS_VENDOR), Darwin)
+        # MacOS X doesn't use OBJCOPY or STRIP_POLICY
+        OBJCOPY=
+        STRIP_POLICY=
+        ZIP_DEBUGINFO_FILES ?= 1
+    else
+      # Default OBJCOPY comes from GNU Binutils on BSD
+      ifeq ($(CROSS_COMPILE_ARCH),)
+        DEF_OBJCOPY=/usr/bin/objcopy
       else
-        # Default OBJCOPY comes from GNU Binutils on BSD
-        ifeq ($(CROSS_COMPILE_ARCH),)
-          DEF_OBJCOPY=/usr/bin/objcopy
-        else
-          # Assume objcopy is part of the cross-compilation toolset
-          ifneq ($(ALT_COMPILER_PATH),)
-            DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
-          endif
+        # Assume objcopy is part of the cross-compilation toolset
+        ifneq ($(ALT_COMPILER_PATH),)
+          DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
         endif
-        OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-        ifneq ($(ALT_OBJCOPY),)
-          $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
-          OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-        endif
+      endif
+      OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+      ifneq ($(ALT_OBJCOPY),)
+        $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
+        OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+      endif
 
-        ifeq ($(OBJCOPY),)
-          $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo" \
-              "files. You may need to set ALT_OBJCOPY."))
-          ENABLE_FULL_DEBUG_SYMBOLS=0
-          $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-        else
-          $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo" \
-              "files."))
+      ifeq ($(OBJCOPY),)
+        $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo" \
+            "files. You may need to set ALT_OBJCOPY."))
+        ENABLE_FULL_DEBUG_SYMBOLS=0
+        $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+      else
+        $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo" \
+            "files."))
 
-          # Library stripping policies for .debuginfo configs:
-          #   all_strip - strips everything from the library
-          #   min_strip - strips most stuff from the library; leaves
-          #               minimum symbols
-          #   no_strip  - does not strip the library at all
-          #
-          # Oracle security policy requires "all_strip". A waiver was
-          # granted on 2011.09.01 that permits using "min_strip" in the
-          # Java JDK and Java JRE.
-          #
-          # Currently, STRIP_POLICY is only used when Full Debug Symbols
-          # is enabled.
-          #
-          STRIP_POLICY ?= min_strip
+        # Library stripping policies for .debuginfo configs:
+        #   all_strip - strips everything from the library
+        #   min_strip - strips most stuff from the library; leaves
+        #               minimum symbols
+        #   no_strip  - does not strip the library at all
+        #
+        # Oracle security policy requires "all_strip". A waiver was
+        # granted on 2011.09.01 that permits using "min_strip" in the
+        # Java JDK and Java JRE.
+        #
+        # Currently, STRIP_POLICY is only used when Full Debug Symbols
+        # is enabled.
+        #
+        STRIP_POLICY ?= min_strip
 
-          $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+        $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
 
-          ZIP_DEBUGINFO_FILES ?= 1
-        endif
+        ZIP_DEBUGINFO_FILES ?= 1
+      endif
 
-        $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
+    endif
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 JDK_INCLUDE_SUBDIR=bsd
 
--- a/hotspot/make/bsd/makefiles/vm.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/bsd/makefiles/vm.make	Mon Jul 13 13:23:31 2015 -0700
@@ -73,12 +73,13 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/defs.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/defs.make	Mon Jul 13 13:23:31 2015 -0700
@@ -122,58 +122,49 @@
 # hotspot version definitions
 include $(GAMMADIR)/make/jdk_version
 
-# Java versions needed
-ifeq ($(PREVIOUS_JDK_VERSION),)
-  PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION)
+# JDK_PREVIOUS_VERSION is only needed to facilitate standalone builds
+ifeq ($(JDK_PREVIOUS_VERSION),)
+  JDK_PREVIOUS_VERSION=$(STANDALONE_JDK_PREVIOUS_VERSION)
 endif
-ifeq ($(JDK_MAJOR_VERSION),)
-  JDK_MAJOR_VERSION=$(JDK_MAJOR_VER)
+# Java versions needed
+ifeq ($(VERSION_MAJOR),)
+  VERSION_MAJOR=$(STANDALONE_JDK_MAJOR_VER)
 endif
-ifeq ($(JDK_MINOR_VERSION),)
-  JDK_MINOR_VERSION=$(JDK_MINOR_VER)
-endif
-ifeq ($(JDK_MICRO_VERSION),)
-  JDK_MICRO_VERSION=$(JDK_MICRO_VER)
+ifeq ($(VERSION_MINOR),)
+  VERSION_MINOR=$(STANDALONE_JDK_MINOR_VER)
 endif
-ifeq ($(JDK_BUILD_NUMBER),)
-  JDK_BUILD_NUMBER=0
+ifeq ($(VERSION_SECURITY),)
+  VERSION_SECURITY=$(STANDALONE_JDK_SECURITY_VER)
 endif
-ifeq ($(JDK_MKTG_VERSION),)
-  JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
+ifeq ($(VERSION_PATCH),)
+  VERSION_PATCH=$(STANDALONE_JDK_PATCH_VER)
 endif
-ifeq ($(JDK_VERSION),)  
-  ifeq ($(BUILD_FLAVOR), product)
-    JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
-  else
-    JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)-$(BUILD_FLAVOR)
-  endif
+ifeq ($(VERSION_BUILD),)
+  VERSION_BUILD=0
 endif
-ifeq ($(FULL_VERSION),)
-  FULL_VERSION="$(JDK_VERSION)"
+ifeq ($(VERSION_SHORT),)
+  VERSION_SHORT=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SECURITY)
+endif
+ifeq ($(VERSION_STRING),)
+  # Note that this is an extremely rough and incorrect approximation of a correct version string.
+  VERSION_STRING=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SECURITY)-internal
 endif
 
-# FULL_VERSION is only used to define JRE_RELEASE_VERSION which is used
-# as JRE version in VM -Xinternalversion output.
-ifndef JRE_RELEASE_VERSION
-  JRE_RELEASE_VERSION=$(FULL_VERSION)
-endif
-
-ifndef HOTSPOT_RELEASE_VERSION
-  HOTSPOT_RELEASE_VERSION=$(FULL_VERSION)
+ifneq ($(HOTSPOT_RELEASE_VERSION),)
+  # Allow old command-line overrides
+  HOTSPOT_VERSION_STRING := $(HOTSPOT_RELEASE_VERSION)
+else
+  # Normally get from surrounding JDK build
+  HOTSPOT_VERSION_STRING := $(VERSION_STRING)
 endif
 
-ifdef HOTSPOT_BUILD_VERSION
-# specified in command line
+ifneq ($(HOTSPOT_BUILD_VERSION),)
+  # If old command-lines variable exists, append to version string
+  HOTSPOT_VERSION_STRING := $(HOTSPOT_VERSION_STRING)-$(HOTSPOT_BUILD_VERSION)
 else
-  ifdef COOKED_BUILD_NUMBER
-# JRE build
-    HOTSPOT_BUILD_VERSION=
-  else
-    ifdef USER_RELEASE_SUFFIX
-      HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
-    else
-      HOTSPOT_BUILD_VERSION=internal
-    endif
+  ifeq ($(SPEC),)
+    # If building standalone, add -internal.
+    HOTSPOT_VERSION_STRING := $(HOTSPOT_VERSION_STRING)-internal
   endif
 endif
 
@@ -233,7 +224,7 @@
 endif
 
 # Find latest promoted JDK area
-JDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(JDK_VERSION)/promoted/latest/binaries/$(PLATFORM)
+JDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(VERSION_STRING)/promoted/latest/binaries/$(PLATFORM)
 ifneq ($(ALT_JDK_IMPORT_PATH),)
   JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH)
 endif
@@ -246,7 +237,7 @@
 endif
 
 # Find JDK used for javac compiles
-BOOTDIR=$(SLASH_JAVA)/re/j2se/$(PREVIOUS_JDK_VERSION)/latest/binaries/$(PLATFORM)
+BOOTDIR=$(SLASH_JAVA)/re/j2se/$(JDK_PREVIOUS_VERSION)/latest/binaries/$(PLATFORM)
 ifneq ($(ALT_BOOTDIR),)
   BOOTDIR=$(ALT_BOOTDIR)
 endif
@@ -337,12 +328,7 @@
 MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
 MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
 MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
-MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
-
-# Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
-# to overwrite the default definition since OS specific Makefile also
-# includes this make/defs.make file.
-MAKE_ARGS += HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION)
+MAKE_ARGS += VERSION_STRING=$(VERSION_STRING)
 
 MAKE_ARGS += BOOT_JDK_SOURCETARGET="$(BOOT_JDK_SOURCETARGET)"
 
--- a/hotspot/make/jdk6_hotspot_distro	Thu Jul 09 13:49:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-# 
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-# 
-
-#
-# This file format must remain compatible with both
-# GNU Makefile and Microsoft nmake formats.
-#
-
-# Don't put quotes (fail windows build).
-HOTSPOT_VM_DISTRO=Java HotSpot(TM)
-COMPANY_NAME=Sun Microsystems, Inc.
-PRODUCT_NAME=Java(TM) Platform SE
--- a/hotspot/make/jdk_version	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/jdk_version	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
-# 
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,12 @@
 #
 
 # Don't put quotes (fail windows build).
-HOTSPOT_VM_COPYRIGHT=Copyright 2014
+HOTSPOT_VM_COPYRIGHT=Copyright 2015
 
-JDK_MAJOR_VER=1
-JDK_MINOR_VER=9
-JDK_MICRO_VER=0
+STANDALONE_JDK_MAJOR_VER=9
+STANDALONE_JDK_MINOR_VER=0
+STANDALONE_JDK_SECURITY_VER=0
+STANDALONE_JDK_PATCH_VER=0
 
 # Previous (bootdir) JDK version
-JDK_PREVIOUS_VERSION=1.8.0
+STANDALONE_JDK_PREVIOUS_VERSION=1.8.0
--- a/hotspot/make/linux/Makefile	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/linux/Makefile	Mon Jul 13 13:23:31 2015 -0700
@@ -210,7 +210,7 @@
 
 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
-BUILDTREE_VARS   += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS   += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 BUILDTREE_VARS   += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
 
 BUILDTREE         = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
--- a/hotspot/make/linux/makefiles/buildtree.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/linux/makefiles/buildtree.make	Mon Jul 13 13:23:31 2015 -0700
@@ -36,9 +36,8 @@
 # GAMMADIR	- top of workspace
 # OS_FAMILY	- operating system
 # VARIANT	- core, compiler1, compiler2, or tiered
-# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
-# HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
-# JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
+# VERSION_STRING - the JDK version string as specified by JEP-223
+# HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
 #
 # Builds the directory trees with makefiles plus some convenience files in
 # each directory:
@@ -133,11 +132,7 @@
 
 # Define variables to be set in flags.make.
 # Default values are set in make/defs.make.
-ifeq ($(HOTSPOT_BUILD_VERSION),)
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
-else
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
-endif
+
 # Set BUILD_USER from system-dependent hints:  $LOGNAME, $(whoami)
 ifndef HOTSPOT_BUILD_USER
   HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@@ -162,7 +157,7 @@
   endif
 endif
 
-BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION=  JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 
 BUILDTREE	= \
 	$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@@ -216,9 +211,9 @@
 	echo "BUILDARCH = $(BUILDARCH)"; \
 	echo "LIBARCH = $(LIBARCH)"; \
 	echo "TARGET = $(TARGET)"; \
-	echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
-	echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
-	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
+	echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
+	echo "VERSION_STRING = $(VERSION_STRING)"; \
+	echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
--- a/hotspot/make/linux/makefiles/defs.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/linux/makefiles/defs.make	Mon Jul 13 13:23:31 2015 -0700
@@ -139,102 +139,85 @@
   endif
 endif
 
-# determine if HotSpot is being built in JDK6 or earlier version
-JDK6_OR_EARLIER=0
-ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
-  # if the longer variable names (newer build style) are set, then check those
-  ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-else
-  # the longer variables aren't set so check the shorter variable names
-  ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-endif
+# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
+# builds is enabled with debug info files ZIP'ed to save space. For
+# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
+# debug build without debug info isn't very useful.
+# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a BUILD_FLAVOR == product build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
+# product build, the FULL_DEBUG_SYMBOLS environment variable will be
+# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
+# the same variable name is used, then different values can be picked
+# up by different parts of the build. Just to be clear, we only need
+# two variable names because the incoming option value can be
+# overridden in some situations, e.g., a BUILD_FLAVOR != product
+# build.
 
-ifeq ($(JDK6_OR_EARLIER),0)
-  # Full Debug Symbols is supported on JDK7 or newer.
-  # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
-  # builds is enabled with debug info files ZIP'ed to save space. For
-  # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
-  # debug build without debug info isn't very useful.
-  # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
-  #
-  # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
-  # disabled for a BUILD_FLAVOR == product build.
-  #
-  # Note: Use of a different variable name for the FDS override option
-  # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
-  # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
-  # in options via environment variables, use of distinct variables
-  # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
-  # product build, the FULL_DEBUG_SYMBOLS environment variable will be
-  # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
-  # the same variable name is used, then different values can be picked
-  # up by different parts of the build. Just to be clear, we only need
-  # two variable names because the incoming option value can be
-  # overridden in some situations, e.g., a BUILD_FLAVOR != product
-  # build.
+# Due to the multiple sub-make processes that occur this logic gets
+# executed multiple times. We reduce the noise by at least checking that
+# BUILD_FLAVOR has been set.
+ifneq ($(BUILD_FLAVOR),)
+  ifeq ($(BUILD_FLAVOR), product)
+    FULL_DEBUG_SYMBOLS ?= 1
+    ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+  else
+    # debug variants always get Full Debug Symbols (if available)
+    ENABLE_FULL_DEBUG_SYMBOLS = 1
+  endif
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-  # Due to the multiple sub-make processes that occur this logic gets
-  # executed multiple times. We reduce the noise by at least checking that
-  # BUILD_FLAVOR has been set.
-  ifneq ($(BUILD_FLAVOR),)
-    ifeq ($(BUILD_FLAVOR), product)
-      FULL_DEBUG_SYMBOLS ?= 1
-      ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    # Default OBJCOPY comes from GNU Binutils on Linux
+    ifeq ($(CROSS_COMPILE_ARCH),)
+      DEF_OBJCOPY=/usr/bin/objcopy
     else
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
+      # Assume objcopy is part of the cross-compilation toolset
+      ifneq ($(ALT_COMPILER_PATH),)
+        DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
+      endif
     endif
-    $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-    # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+    ifneq ($(ALT_OBJCOPY),)
+      $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
+      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+    endif
 
-    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-      # Default OBJCOPY comes from GNU Binutils on Linux
-      ifeq ($(CROSS_COMPILE_ARCH),)
-        DEF_OBJCOPY=/usr/bin/objcopy
-      else
-        # Assume objcopy is part of the cross-compilation toolset
-        ifneq ($(ALT_COMPILER_PATH),)
-          DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
-        endif
-      endif
-      OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-      ifneq ($(ALT_OBJCOPY),)
-        $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
-        OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-      endif
+    ifeq ($(OBJCOPY),)
+      $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
+      ENABLE_FULL_DEBUG_SYMBOLS=0
+      $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+    else
+      $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
 
-      ifeq ($(OBJCOPY),)
-        $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY."))
-        ENABLE_FULL_DEBUG_SYMBOLS=0
-        $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-      else
-        $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
+      # Library stripping policies for .debuginfo configs:
+      #   all_strip - strips everything from the library
+      #   min_strip - strips most stuff from the library; leaves minimum symbols
+      #   no_strip  - does not strip the library at all
+      #
+      # Oracle security policy requires "all_strip". A waiver was granted on
+      # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+      #
+      # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+      #
+      STRIP_POLICY ?= min_strip
 
-        # Library stripping policies for .debuginfo configs:
-        #   all_strip - strips everything from the library
-        #   min_strip - strips most stuff from the library; leaves minimum symbols
-        #   no_strip  - does not strip the library at all
-        #
-        # Oracle security policy requires "all_strip". A waiver was granted on
-        # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-        #
-        # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
-        #
-        STRIP_POLICY ?= min_strip
+      $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+      ZIP_DEBUGINFO_FILES ?= 1
 
-        $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
-
-        ZIP_DEBUGINFO_FILES ?= 1
-
-        $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
+    endif
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 JDK_INCLUDE_SUBDIR=linux
 
--- a/hotspot/make/linux/makefiles/vm.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/linux/makefiles/vm.make	Mon Jul 13 13:23:31 2015 -0700
@@ -75,12 +75,13 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/solaris/Makefile	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/solaris/Makefile	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -157,7 +157,7 @@
 
 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
-BUILDTREE_VARS   += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS   += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 BUILDTREE_VARS   += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
 
 BUILDTREE         = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
--- a/hotspot/make/solaris/makefiles/buildtree.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/solaris/makefiles/buildtree.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -36,9 +36,8 @@
 # GAMMADIR	- top of workspace
 # OS_FAMILY	- operating system
 # VARIANT	- core, compiler1, compiler2, or tiered
-# HOTSPOT_RELEASE_VERSION - <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
-# HOTSPOT_BUILD_VERSION   - internal, internal-$(USER_RELEASE_SUFFIX) or empty
-# JRE_RELEASE_VERSION     - <major>.<minor>.<micro> (1.7.0)
+# VERSION_STRING - the JDK version string as specified by JEP-223
+# HOTSPOT_VERSION_STRING - the same as VERSION_STRING, unless overridden by a standalone build
 #
 # Builds the directory trees with makefiles plus some convenience files in
 # each directory:
@@ -124,11 +123,7 @@
 
 # Define variables to be set in flags.make.
 # Default values are set in make/defs.make.
-ifeq ($(HOTSPOT_BUILD_VERSION),)
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
-else
-  HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
-endif
+
 # Set BUILD_USER from system-dependent hints:  $LOGNAME, $(whoami)
 ifndef HOTSPOT_BUILD_USER
   HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
@@ -153,7 +148,7 @@
   endif
 endif
 
-BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS += HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING) VERSION_STRING=$(VERSION_STRING)
 
 BUILDTREE	= \
 	$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
@@ -203,9 +198,9 @@
 	echo "BUILDARCH = $(BUILDARCH)"; \
 	echo "LIBARCH = $(LIBARCH)"; \
 	echo "TARGET = $(TARGET)"; \
-	echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
-	echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
-	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
+	echo "HOTSPOT_VERSION_STRING = $(HOTSPOT_VERSION_STRING)"; \
+	echo "VERSION_STRING = $(VERSION_STRING)"; \
+	echo "SA_BUILD_VERSION = $(HOTSPOT_VERSION_STRING)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
--- a/hotspot/make/solaris/makefiles/defs.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/solaris/makefiles/defs.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -77,144 +77,127 @@
   endif
 endif
 
-# determine if HotSpot is being built in JDK6 or earlier version
-JDK6_OR_EARLIER=0
-ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
-  # if the longer variable names (newer build style) are set, then check those
-  ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-else
-  # the longer variables aren't set so check the shorter variable names
-  ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
-    JDK6_OR_EARLIER=1
-  endif
-endif
+# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
+# builds is enabled with debug info files ZIP'ed to save space. For
+# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
+# debug build without debug info isn't very useful.
+# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a BUILD_FLAVOR == product build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
+# product build, the FULL_DEBUG_SYMBOLS environment variable will be
+# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
+# the same variable name is used, then different values can be picked
+# up by different parts of the build. Just to be clear, we only need
+# two variable names because the incoming option value can be
+# overridden in some situations, e.g., a BUILD_FLAVOR != product
+# build.
 
-ifeq ($(JDK6_OR_EARLIER),0)
-  # Full Debug Symbols is supported on JDK7 or newer.
-  # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
-  # builds is enabled with debug info files ZIP'ed to save space. For
-  # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
-  # debug build without debug info isn't very useful.
-  # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
-  #
-  # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
-  # disabled for a BUILD_FLAVOR == product build.
-  #
-  # Note: Use of a different variable name for the FDS override option
-  # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
-  # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
-  # in options via environment variables, use of distinct variables
-  # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
-  # product build, the FULL_DEBUG_SYMBOLS environment variable will be
-  # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
-  # the same variable name is used, then different values can be picked
-  # up by different parts of the build. Just to be clear, we only need
-  # two variable names because the incoming option value can be
-  # overridden in some situations, e.g., a BUILD_FLAVOR != product
-  # build.
+# Due to the multiple sub-make processes that occur this logic gets
+# executed multiple times. We reduce the noise by at least checking that
+# BUILD_FLAVOR has been set.
+ifneq ($(BUILD_FLAVOR),)
+  ifeq ($(BUILD_FLAVOR), product)
+    FULL_DEBUG_SYMBOLS ?= 1
+    ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+  else
+    # debug variants always get Full Debug Symbols (if available)
+    ENABLE_FULL_DEBUG_SYMBOLS = 1
+  endif
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-  # Due to the multiple sub-make processes that occur this logic gets
-  # executed multiple times. We reduce the noise by at least checking that
-  # BUILD_FLAVOR has been set.
-  ifneq ($(BUILD_FLAVOR),)
-    ifeq ($(BUILD_FLAVOR), product)
-      FULL_DEBUG_SYMBOLS ?= 1
-      ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
-    else
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    # Default OBJCOPY comes from the SUNWbinutils package:
+    DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
+    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+    ifneq ($(ALT_OBJCOPY),)
+      $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
+      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
     endif
-    $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-    # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
-
-    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-      # Default OBJCOPY comes from the SUNWbinutils package:
-      DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
-      OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-      ifneq ($(ALT_OBJCOPY),)
-        $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)"))
-        OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-      endif
 
-      ifneq ($(OBJCOPY),)
-        # OBJCOPY version check:
-        # - version number is last blank separate word on first line
-        # - version number formats that have been seen:
-        #   - <major>.<minor>
-        #   - <major>.<minor>.<micro>
-        #
-        # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
-        #
-        OBJCOPY_VERS_CHK := $(shell \
-          $(OBJCOPY) --version \
-            | sed -n \
-                  -e 's/.* //' \
-                  -e '/^[01]\./b bad' \
-                  -e '/^2\./{' \
-                  -e '  s/^2\.//' \
-                  -e '  /^[0-9]$$/b bad' \
-                  -e '  /^[0-9]\./b bad' \
-                  -e '  /^1[0-9]$$/b bad' \
-                  -e '  /^1[0-9]\./b bad' \
-                  -e '  /^20\./b bad' \
-                  -e '  /^21\.0$$/b bad' \
-                  -e '  /^21\.0\./b bad' \
-                  -e '}' \
-                  -e ':good' \
-                  -e 's/.*/VALID_VERSION/p' \
-                  -e 'q' \
-                  -e ':bad' \
-                  -e 's/.*/BAD_VERSION/p' \
-                  -e 'q' \
+    ifneq ($(OBJCOPY),)
+      # OBJCOPY version check:
+      # - version number is last blank separate word on first line
+      # - version number formats that have been seen:
+      #   - <major>.<minor>
+      #   - <major>.<minor>.<micro>
+      #
+      # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
+      #
+      OBJCOPY_VERS_CHK := $(shell \
+        $(OBJCOPY) --version \
+          | sed -n \
+                -e 's/.* //' \
+                -e '/^[01]\./b bad' \
+                -e '/^2\./{' \
+                -e '  s/^2\.//' \
+                -e '  /^[0-9]$$/b bad' \
+                -e '  /^[0-9]\./b bad' \
+                -e '  /^1[0-9]$$/b bad' \
+                -e '  /^1[0-9]\./b bad' \
+                -e '  /^20\./b bad' \
+                -e '  /^21\.0$$/b bad' \
+                -e '  /^21\.0\./b bad' \
+                -e '}' \
+                -e ':good' \
+                -e 's/.*/VALID_VERSION/p' \
+                -e 'q' \
+                -e ':bad' \
+                -e 's/.*/BAD_VERSION/p' \
+                -e 'q' \
+        )
+      ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
+        _JUNK_ := $(shell \
+          echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
+          $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
+          echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
+            "is needed to create valid .debuginfo files."; \
+          echo >&2 "WARNING: ignoring above objcopy command."; \
+          echo >&2 "WARNING: patch 149063-01 or newer contains the" \
+            "correct Solaris 10 SPARC version."; \
+          echo >&2 "WARNING: patch 149064-01 or newer contains the" \
+            "correct Solaris 10 X86 version."; \
+          echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
+            "correct version."; \
           )
-        ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
-          _JUNK_ := $(shell \
-            echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
-            $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
-            echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
-              "is needed to create valid .debuginfo files."; \
-            echo >&2 "WARNING: ignoring above objcopy command."; \
-            echo >&2 "WARNING: patch 149063-01 or newer contains the" \
-              "correct Solaris 10 SPARC version."; \
-            echo >&2 "WARNING: patch 149064-01 or newer contains the" \
-              "correct Solaris 10 X86 version."; \
-            echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
-              "correct version."; \
-            )
-          OBJCOPY=
-        endif
+        OBJCOPY=
       endif
+    endif
+
+    ifeq ($(OBJCOPY),)
+      $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
+      ENABLE_FULL_DEBUG_SYMBOLS=0
+      $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+    else
+      $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
 
-      ifeq ($(OBJCOPY),)
-        $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files."))
-        ENABLE_FULL_DEBUG_SYMBOLS=0
-        $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
-      else
-        $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files."))
+      # Library stripping policies for .debuginfo configs:
+      #   all_strip - strips everything from the library
+      #   min_strip - strips most stuff from the library; leaves minimum symbols
+      #   no_strip  - does not strip the library at all
+      #
+      # Oracle security policy requires "all_strip". A waiver was granted on
+      # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+      #
+      # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+      #
+      STRIP_POLICY ?= min_strip
 
-        # Library stripping policies for .debuginfo configs:
-        #   all_strip - strips everything from the library
-        #   min_strip - strips most stuff from the library; leaves minimum symbols
-        #   no_strip  - does not strip the library at all
-        #
-        # Oracle security policy requires "all_strip". A waiver was granted on
-        # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
-        #
-        # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
-        #
-        STRIP_POLICY ?= min_strip
+      $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+      ZIP_DEBUGINFO_FILES ?= 1
 
-        $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
-
-        ZIP_DEBUGINFO_FILES ?= 1
-
-        $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
+    endif
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 JDK_INCLUDE_SUBDIR=solaris
 
--- a/hotspot/make/solaris/makefiles/sparcWorks.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # If a SPEC is not set already, then use these defaults.
@@ -39,7 +39,7 @@
   STRIP	= /usr/ccs/bin/strip
 endif
 
-# Check for the versions of C++ and C compilers ($CXX and $CC) used. 
+# Check for the versions of C++ and C compilers ($CXX and $CC) used.
 
 # Get the last thing on the line that looks like x.x+ (x is a digit).
 COMPILER_REV := \
@@ -48,15 +48,9 @@
 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
 
 # Pick which compiler is validated
-ifeq ($(JRE_RELEASE_VER),1.6.0)
-  # Validated compiler for JDK6 is SS11 (5.8)
-  VALIDATED_COMPILER_REVS   := 5.8
-  VALIDATED_CC_COMPILER_REVS := 5.8
-else
-  # Validated compiler for JDK9 is SS12.3 (5.12)
-  VALIDATED_COMPILER_REVS   := 5.12
-  VALIDATED_CC_COMPILER_REVS := 5.12
-endif
+# Validated compiler for JDK9 is SS12.3 (5.12)
+VALIDATED_COMPILER_REVS   := 5.12
+VALIDATED_CC_COMPILER_REVS := 5.12
 
 # Warning messages about not using the above validated versions
 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
@@ -237,7 +231,7 @@
 CFLAGS/NOEX=-features=no%except
 
 
-# avoid compilation problems arising from fact that C++ compiler tries 
+# avoid compilation problems arising from fact that C++ compiler tries
 # to search for external template definition by just compiling additional
 # source files in th same context
 CFLAGS +=  -template=no%extdef
@@ -245,7 +239,7 @@
 # Reduce code bloat by reverting back to 5.0 behavior for static initializers
 CFLAGS += -features=no%split_init
 
-# Use -D_Crun_inline_placement so we don't get references to 
+# Use -D_Crun_inline_placement so we don't get references to
 #    __1c2n6FIpv_0_ or   void*operator new(unsigned,void*)
 #  This avoids the hard requirement of the newer Solaris C++ runtime patches.
 #  NOTE: This is an undocumented feature of the SS10 compiler. See 6306698.
--- a/hotspot/make/solaris/makefiles/vm.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/solaris/makefiles/vm.make	Mon Jul 13 13:23:31 2015 -0700
@@ -69,12 +69,13 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/windows/build.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/build.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -123,38 +123,12 @@
 # or make/hotspot_distro.
 !ifndef HOTSPOT_VM_DISTRO
 !if exists($(WorkSpace)\src\closed)
-
-# if the build is for JDK6 or earlier version, it should include jdk6_hotspot_distro,
-# instead of hotspot_distro.
-JDK6_OR_EARLIER=0
-!if "$(JDK_MAJOR_VERSION)" != "" && "$(JDK_MINOR_VERSION)" != "" && "$(JDK_MICRO_VERSION)" != ""
-!if $(JDK_MAJOR_VERSION) == 1 && $(JDK_MINOR_VERSION) < 7
-JDK6_OR_EARLIER=1
-!endif
-!else
-!if $(JDK_MAJOR_VER) == 1 && $(JDK_MINOR_VER) < 7
-JDK6_OR_EARLIER=1
-!endif
-!endif
-
-!if $(JDK6_OR_EARLIER) == 1
-!include $(WorkSpace)\make\jdk6_hotspot_distro
-!else
 !include $(WorkSpace)\make\hotspot_distro
-!endif
 !else
 !include $(WorkSpace)\make\openjdk_distro
 !endif
 !endif
 
-# Following the Web Start / Plugin model here....
-# We can have update versions like "01a", but Windows requires
-# we use only integers in the file version field.  So:
-# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
-#
-JDK_UPDATE_VER=0
-JDK_BUILD_NUMBER=0
-
 HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
 
 # JDK ProductVersion:
@@ -163,34 +137,27 @@
 #       1.6.0-b01     will be 6.0.0.1
 #       1.6.0_01a-b02 will be 6.0.11.2
 #
-# JDK_* variables are defined in make/jdk_version or on command line
+# STANDALONE_JDK_* variables are defined in make/jdk_version or on command line
 #
-JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
-JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
-!if "$(JRE_RELEASE_VERSION)" == ""
-JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)
-!else
-JRE_RELEASE_VER=$(JRE_RELEASE_VERSION)
+!if "$(JDK_VER)" == ""
+JDK_VER=$(STANDALONE_JDK_MAJOR_VER),$(STANDALONE_JDK_MINOR_VER),$(STANDALONE_JDK_SECURITY_VER),$(STANDALONE_JDK_PATCH_VER)
 !endif
-!if "$(JDK_MKTG_VERSION)" == ""
-JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
+!if "$(JDK_DOTVER)" == ""
+JDK_DOTVER=$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER).$(STANDALONE_JDK_PATCH_VER)
+!endif
+!if "$(VERSION_SHORT)" == ""
+VERSION_SHORT=$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER)
 !endif
 
-# Hotspot Express VM FileVersion:
-# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).
-#
-#
 HS_VER=$(JDK_VER)
 HS_DOTVER=$(JDK_DOTVER)
 
 !if "$(HOTSPOT_RELEASE_VERSION)" == ""
-HOTSPOT_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+HOTSPOT_RELEASE_VERSION=$(VERSION_STRING)
 !endif
 
-!if "$(HOTSPOT_BUILD_VERSION)" == ""
-HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
-!else
-HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
+!if "$(HOTSPOT_VERSION_STRING)" == ""
+HOTSPOT_VERSION_STRING=$(HOTSPOT_RELEASE_VERSION)
 !endif
 
 # End VERSIONINFO parameters
@@ -280,15 +247,15 @@
 	@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)		>> $@
 	@ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK)	>> $@
 	@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT)		>> $@
-	@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION)	>> $@
-	@ echo HS_BUILD_VER=$(HS_BUILD_VER)			>> $@
+	@ echo HS_NAME=$(PRODUCT_NAME) $(VERSION_SHORT)		>> $@
+	@ echo HOTSPOT_VERSION_STRING=$(HOTSPOT_VERSION_STRING)	>> $@
 	@ echo BUILD_WIN_SA=$(BUILD_WIN_SA)    			>> $@
-	@ echo SA_BUILD_VERSION=$(HS_BUILD_VER)                 >> $@
+	@ echo SA_BUILD_VERSION=$(HOTSPOT_VERSION_STRING)       >> $@
 	@ echo SA_INCLUDE=$(SA_INCLUDE)      			>> $@
 	@ echo SA_LIB=$(SA_LIB)         			>> $@
 	@ echo JDK_VER=$(JDK_VER)				>> $@
 	@ echo JDK_DOTVER=$(JDK_DOTVER)				>> $@
-	@ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER)		>> $@
+	@ echo VERSION_STRING=$(VERSION_STRING)			>> $@
 	@ echo BUILDARCH=$(BUILDARCH)         			>> $@
 	@ echo Platform_arch=$(Platform_arch)        		>> $@
 	@ echo Platform_arch_model=$(Platform_arch_model)	>> $@
--- a/hotspot/make/windows/makefiles/compile.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/makefiles/compile.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Generic compiler settings
@@ -166,7 +166,7 @@
 !endif
 
 
-!if $(MSC_VER) >= 1600 
+!if $(MSC_VER) >= 1600
 LD_FLAGS= $(LD_FLAGS) psapi.lib
 !endif
 
@@ -190,4 +190,3 @@
 !if "$(MFC_DEBUG)" == "true"
 RC_FLAGS = $(RC_FLAGS) /D "_DEBUG"
 !endif
-
--- a/hotspot/make/windows/makefiles/debug.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/makefiles/debug.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 HS_INTERNAL_NAME=jvm
@@ -44,7 +44,7 @@
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
 
-HS_BUILD_ID=$(HS_BUILD_VER)-debug
+HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)-debug
 
 # Force resources to be rebuilt every time
 $(Res_Files): FORCE
--- a/hotspot/make/windows/makefiles/defs.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/makefiles/defs.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -177,24 +177,18 @@
 # Library suffix
 LIBRARY_SUFFIX=dll
 
-# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
-# and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.
-
 # next parameters are defined in $(GAMMADIR)/make/defs.make.
-MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION)
-MAKE_ARGS += JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION)
-MAKE_ARGS += JDK_MINOR_VERSION=$(JDK_MINOR_VERSION)
-MAKE_ARGS += JDK_MICRO_VERSION=$(JDK_MICRO_VERSION)
+MAKE_ARGS += VERSION_SHORT=$(VERSION_SHORT)
+MAKE_ARGS += VERSION_MAJOR=$(VERSION_MAJOR)
+MAKE_ARGS += VERSION_MINOR=$(VERSION_MINOR)
+MAKE_ARGS += VERSION_SECURITY=$(VERSION_SECURITY)
+MAKE_ARGS += VERSION_PATCH=$(VERSION_PATCH)
+MAKE_ARGS += VERSION_BUILD=$(VERSION_BUILD)
 
-ifdef COOKED_JDK_UPDATE_VERSION
-  MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION)
-endif
-
-# COOKED_BUILD_NUMBER should only be set if we have a numeric
-# build number.  It must not be zero padded.
-ifdef COOKED_BUILD_NUMBER
-  MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
-endif
+# JDK_DOTVER and JDK_VER are needed in Windows RC files
+COMMA:=,
+MAKE_ARGS += JDK_DOTVER=$(VERSION_NUMBER_FOUR_POSITIONS)
+MAKE_ARGS += JDK_VER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))
 
 NMAKE= MAKEFLAGS= MFLAGS= EXTRA_CFLAGS="$(EXTRA_CFLAGS)" nmake -NOLOGO
 ifndef SYSTEM_UNAME
--- a/hotspot/make/windows/makefiles/fastdebug.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/makefiles/fastdebug.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 HS_INTERNAL_NAME=jvm
@@ -43,7 +43,7 @@
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
 
-HS_BUILD_ID=$(HS_BUILD_VER)-fastdebug
+HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)-fastdebug
 
 # Force resources to be rebuilt every time
 $(Res_Files): FORCE
--- a/hotspot/make/windows/makefiles/product.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/makefiles/product.make	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 HS_INTERNAL_NAME=jvm
@@ -46,7 +46,7 @@
 !include $(WorkSpace)/make/windows/makefiles/vm.make
 !include local.make
 
-HS_BUILD_ID=$(HS_BUILD_VER)
+HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)
 
 # Force resources to be rebuilt every time
 $(Res_Files): FORCE
--- a/hotspot/make/windows/makefiles/vm.make	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/makefiles/vm.make	Mon Jul 13 13:23:31 2015 -0700
@@ -58,12 +58,13 @@
 !endif
 
 # The following variables are defined in the generated local.make file.
-CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MICRO_VERSION=\"$(JDK_MICRO_VERSION)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_BUILD_NUMBER=\"$(JDK_BUILD_NUMBER)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_VERSION_STRING=\"$(HOTSPOT_VERSION_STRING)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_MAJOR=$(VERSION_MAJOR)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_MINOR=$(VERSION_MINOR)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_SECURITY=$(VERSION_SECURITY)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_PATCH=$(VERSION_PATCH)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_BUILD=$(VERSION_BUILD)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_STRING=\"$(VERSION_STRING)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
@@ -403,4 +404,3 @@
 
 vm.def: $(Obj_Files)
 	sh $(WorkSpace)/make/windows/build_vm_def.sh $(BUILD_VM_DEF_FLAG)
-
--- a/hotspot/make/windows/projectfiles/common/Makefile	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/make/windows/projectfiles/common/Makefile	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 !ifdef LOCAL_MAKE
@@ -80,15 +80,15 @@
 
 !include $(HOTSPOTWORKSPACE)/make/jdk_version
 
-!if "$(USER_RELEASE_SUFFIX)" != ""
-HOTSPOT_BUILD_VERSION = internal-$(USER_RELEASE_SUFFIX)
+!if "$(VERSION_OPT)" != ""
+HOTSPOT_BUILD_VERSION = internal-$(VERSION_OPT)
 !else
 HOTSPOT_BUILD_VERSION = internal
 !endif
-!if "$(JRE_RELEASE_VERSION)" != ""
-JRE_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\""
+!if "$(VERSION_STRING)" != ""
+JRE_RELEASE_VERSION="\\\"$(VERSION_STRING)\\\""
 !else
-JRE_RELEASE_VERSION="\\\"$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)\\\""
+JRE_RELEASE_VERSION="\\\"$(STANDALONE_JDK_MAJOR_VER).$(STANDALONE_JDK_MINOR_VER).$(STANDALONE_JDK_SECURITY_VER)\\\""
 !endif
 !if "$(HOTSPOT_RELEASE_VERSION)" != ""
 HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
@@ -105,18 +105,17 @@
 !else
 HOTSPOT_VM_DISTRO="\\\"OpenJDK\\\""
 !endif
-!if "$(JDK_BUILD_NUMBER)" != ""
-JDK_BUILD_NUMBER="\\\"$(JDK_BUILD_NUMBER)\\\""
-!else
-JDK_BUILD_NUMBER="\\\"00\\\""
+!if "$(VERSION_BUILD)" == ""
+VERSION_BUILD=0
 !endif
 !endif
 
-JDK_MAJOR_VERSION="\\\"$(JDK_MAJOR_VER)\\\""
-JDK_MINOR_VERSION="\\\"$(JDK_MINOR_VER)\\\""
-JDK_MICRO_VERSION="\\\"$(JDK_MICRO_VER)\\\""
+VERSION_MAJOR=$(STANDALONE_JDK_MAJOR_VER)
+VERSION_MINOR=$(STANDALONE_JDK_MINOR_VER)
+VERSION_SECURITY=$(STANDALONE_JDK_SECURITY_VER)
+VERSION_PATCH=$(STANDALONE_JDK_PATCH_VER)
 
-ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) -define JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) -define JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) -define JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) -define VISUAL_STUDIO_BUILD=true
+ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define VERSION_MAJOR=$(VERSION_MAJOR) -define VERSION_MINOR=$(VERSION_MINOR) -define VERSION_SECURITY=$(VERSION_SECURITY) -define VERSION_PATCH=$(VERSION_PATCH) -define VISUAL_STUDIO_BUILD=true
 ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
 
 $(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
--- a/hotspot/src/share/vm/memory/universe.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/memory/universe.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -350,37 +350,6 @@
   // Have already been initialized.
   _objectArrayKlassObj->append_to_sibling_list();
 
-  // Compute is_jdk version flags.
-  // Only 1.3 or later has the java.lang.Shutdown class.
-  // Only 1.4 or later has the java.lang.CharSequence interface.
-  // Only 1.5 or later has the java.lang.management.MemoryUsage class.
-  if (JDK_Version::is_partially_initialized()) {
-    uint8_t jdk_version;
-    Klass* k = SystemDictionary::resolve_or_null(
-        vmSymbols::java_lang_management_MemoryUsage(), THREAD);
-    CLEAR_PENDING_EXCEPTION; // ignore exceptions
-    if (k == NULL) {
-      k = SystemDictionary::resolve_or_null(
-          vmSymbols::java_lang_CharSequence(), THREAD);
-      CLEAR_PENDING_EXCEPTION; // ignore exceptions
-      if (k == NULL) {
-        k = SystemDictionary::resolve_or_null(
-            vmSymbols::java_lang_Shutdown(), THREAD);
-        CLEAR_PENDING_EXCEPTION; // ignore exceptions
-        if (k == NULL) {
-          jdk_version = 2;
-        } else {
-          jdk_version = 3;
-        }
-      } else {
-        jdk_version = 4;
-      }
-    } else {
-      jdk_version = 5;
-    }
-    JDK_Version::fully_initialize(jdk_version);
-  }
-
   #ifdef ASSERT
   if (FullGCALot) {
     // Allocate an array of dummy objects.
--- a/hotspot/src/share/vm/prims/jvm.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -3656,8 +3656,7 @@
   memset(info, 0, info_size);
 
   info->jvm_version = Abstract_VM_Version::jvm_version();
-  info->update_version = 0;          /* 0 in HotSpot Express VM */
-  info->special_update_version = 0;  /* 0 in HotSpot Express VM */
+  info->patch_version = Abstract_VM_Version::vm_patch_version();
 
   // when we add a new capability in the jvm_version_info struct, we should also
   // consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
--- a/hotspot/src/share/vm/prims/jvm.h	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/prims/jvm.h	Mon Jul 13 13:23:31 2015 -0700
@@ -1184,10 +1184,9 @@
  * ==========================================================================
  */
 typedef struct {
-    /* VM version string: follows the JDK release version naming convention    */
-    unsigned int jvm_version; /* <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]  */
-    unsigned int update_version : 8;
-    unsigned int special_update_version : 8;
+    unsigned int jvm_version; /* Encoded $VNUM as defined by JEP-223 */
+    unsigned int patch_version : 8; /* JEP-223 patch version */
+    unsigned int reserved3 : 8;
     unsigned int reserved1 : 16;
     unsigned int reserved2;
 
@@ -1206,18 +1205,16 @@
 
 #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JVM_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
+#define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 #define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
 
 JNIEXPORT void JNICALL
 JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
 
 typedef struct {
-    // Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx
-    unsigned int jdk_version;   /* Consists of major, minor, micro (n.n.n) */
-                                /* and build number (xx) */
-    unsigned int update_version : 8;         /* Update release version (uu) */
-    unsigned int special_update_version : 8; /* Special update release version (c)*/
+    unsigned int jdk_version; /* Encoded $VNUM as defined by JEP-223 */
+    unsigned int patch_version : 8; /* JEP-223 patch version */
+    unsigned int reserved3 : 8;
     unsigned int reserved1 : 16;
     unsigned int reserved2;
 
@@ -1238,11 +1235,7 @@
 
 #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JDK_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
-
-/* Build number is available only for RE build (i.e. JDK_BUILD_NUMBER is set to bNN)
- * It will be zero for internal builds.
- */
+#define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
 
 /*
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -221,12 +221,11 @@
 void Arguments::init_version_specific_system_properties() {
   enum { bufsz = 16 };
   char buffer[bufsz];
-  const char* spec_vendor = "Sun Microsystems Inc.";
-  uint32_t spec_version = 0;
-
-  spec_vendor = "Oracle Corporation";
-  spec_version = JDK_Version::current().major_version();
-  jio_snprintf(buffer, bufsz, "1." UINT32_FORMAT, spec_version);
+  const char* spec_vendor = "Oracle Corporation";
+  uint32_t spec_version_major = 0;
+
+  spec_version_major = JDK_Version::current().major_version();
+  jio_snprintf(buffer, bufsz, UINT32_FORMAT, spec_version_major);
 
   PropertyList_add(&_system_properties,
       new SystemProperty("java.vm.specification.vendor",  spec_vendor, false));
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/runtime/java.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -635,47 +635,23 @@
   jdk_version_info_fn_t func = CAST_TO_FN_PTR(jdk_version_info_fn_t,
      os::dll_lookup(lib_handle, "JDK_GetVersionInfo0"));
 
-  if (func == NULL) {
-    // JDK older than 1.6
-    _current._partially_initialized = true;
-  } else {
-    (*func)(&info, sizeof(info));
+  assert(func != NULL, "Support for JDK 1.5 or older has been removed after JEP-223");
+
+  (*func)(&info, sizeof(info));
+
+  int major = JDK_VERSION_MAJOR(info.jdk_version);
+  int minor = JDK_VERSION_MINOR(info.jdk_version);
+  int security = JDK_VERSION_SECURITY(info.jdk_version);
+  int build = JDK_VERSION_BUILD(info.jdk_version);
 
-    int major = JDK_VERSION_MAJOR(info.jdk_version);
-    int minor = JDK_VERSION_MINOR(info.jdk_version);
-    int micro = JDK_VERSION_MICRO(info.jdk_version);
-    int build = JDK_VERSION_BUILD(info.jdk_version);
-    if (major == 1 && minor > 4) {
-      // We represent "1.5.0" as "5.0", but 1.4.2 as itself.
-      major = minor;
-      minor = micro;
-      micro = 0;
-    }
-    // Incompatible with pre-4243978 JDK.
-    if (info.pending_list_uses_discovered_field == 0) {
-      vm_exit_during_initialization(
-        "Incompatible JDK is not using Reference.discovered field for pending list");
-    }
-    _current = JDK_Version(major, minor, micro, info.update_version,
-                           info.special_update_version, build,
-                           info.thread_park_blocker == 1,
-                           info.post_vm_init_hook_enabled == 1);
+  // Incompatible with pre-4243978 JDK.
+  if (info.pending_list_uses_discovered_field == 0) {
+    vm_exit_during_initialization(
+      "Incompatible JDK is not using Reference.discovered field for pending list");
   }
-}
-
-void JDK_Version::fully_initialize(
-    uint8_t major, uint8_t minor, uint8_t micro, uint8_t update) {
-  // This is only called when current is less than 1.6 and we've gotten
-  // far enough in the initialization to determine the exact version.
-  assert(major < 6, "not needed for JDK version >= 6");
-  assert(is_partially_initialized(), "must not initialize");
-  if (major < 5) {
-    // JDK verison sequence: 1.2.x, 1.3.x, 1.4.x, 5.0.x, 6.0.x, etc.
-    micro = minor;
-    minor = major;
-    major = 1;
-  }
-  _current = JDK_Version(major, minor, micro, update);
+  _current = JDK_Version(major, minor, security, info.patch_version, build,
+                         info.thread_park_blocker == 1,
+                         info.post_vm_init_hook_enabled == 1);
 }
 
 void JDK_Version_init() {
@@ -684,29 +660,18 @@
 
 static int64_t encode_jdk_version(const JDK_Version& v) {
   return
-    ((int64_t)v.major_version()          << (BitsPerByte * 5)) |
-    ((int64_t)v.minor_version()          << (BitsPerByte * 4)) |
-    ((int64_t)v.micro_version()          << (BitsPerByte * 3)) |
-    ((int64_t)v.update_version()         << (BitsPerByte * 2)) |
-    ((int64_t)v.special_update_version() << (BitsPerByte * 1)) |
+    ((int64_t)v.major_version()          << (BitsPerByte * 4)) |
+    ((int64_t)v.minor_version()          << (BitsPerByte * 3)) |
+    ((int64_t)v.security_version()       << (BitsPerByte * 2)) |
+    ((int64_t)v.patch_version()          << (BitsPerByte * 1)) |
     ((int64_t)v.build_number()           << (BitsPerByte * 0));
 }
 
 int JDK_Version::compare(const JDK_Version& other) const {
   assert(is_valid() && other.is_valid(), "Invalid version (uninitialized?)");
-  if (!is_partially_initialized() && other.is_partially_initialized()) {
-    return -(other.compare(*this)); // flip the comparators
-  }
-  assert(!other.is_partially_initialized(), "Not initialized yet");
-  if (is_partially_initialized()) {
-    assert(other.major_version() >= 6,
-           "Invalid JDK version comparison during initialization");
-    return -1;
-  } else {
-    uint64_t e = encode_jdk_version(*this);
-    uint64_t o = encode_jdk_version(other);
-    return (e > o) ? 1 : ((e == o) ? 0 : -1);
-  }
+  uint64_t e = encode_jdk_version(*this);
+  uint64_t o = encode_jdk_version(other);
+  return (e > o) ? 1 : ((e == o) ? 0 : -1);
 }
 
 void JDK_Version::to_string(char* buffer, size_t buflen) const {
@@ -715,28 +680,21 @@
 
   if (!is_valid()) {
     jio_snprintf(buffer, buflen, "%s", "(uninitialized)");
-  } else if (is_partially_initialized()) {
-    jio_snprintf(buffer, buflen, "%s", "(uninitialized) pre-1.6.0");
   } else {
     int rc = jio_snprintf(
         &buffer[index], buflen - index, "%d.%d", _major, _minor);
     if (rc == -1) return;
     index += rc;
-    if (_micro > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _micro);
+    if (_security > 0) {
+      rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _security);
     }
-    if (_update > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, "_%02d", _update);
-      if (rc == -1) return;
-      index += rc;
-    }
-    if (_special > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, "%c", _special);
+    if (_patch > 0) {
+      rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _patch);
       if (rc == -1) return;
       index += rc;
     }
     if (_build > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, "-b%02d", _build);
+      rc = jio_snprintf(&buffer[index], buflen - index, "+%d", _build);
       if (rc == -1) return;
       index += rc;
     }
--- a/hotspot/src/share/vm/runtime/java.hpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/runtime/java.hpp	Mon Jul 13 13:23:31 2015 -0700
@@ -51,18 +51,9 @@
 extern void vm_shutdown_during_initialization(const char* error, const char* message = NULL);
 
 /**
- * Discovering the JDK_Version during initialization is tricky when the
- * running JDK is less than JDK6.  For JDK6 and greater, a "GetVersion"
- * function exists in libjava.so and we simply call it during the
- * 'initialize()' call to find the version.  For JDKs with version < 6, no
- * such call exists and we have to probe the JDK in order to determine
- * the exact version.  This probing cannot happen during late in
- * the VM initialization process so there's a period of time during
- * initialization when we don't know anything about the JDK version other than
- * that it less than version 6.  This is the "partially initialized" time,
- * when we can answer only certain version queries (such as, is the JDK
- * version greater than 5?  Answer: no).  Once the JDK probing occurs, we
- * know the version and are considered fully initialized.
+ * With the integration of the changes to handle the version string
+ * as defined by JEP-223, most of the code related to handle the version
+ * string prior to JDK 1.6 was removed (partial initialization)
  */
 class JDK_Version VALUE_OBJ_CLASS_SPEC {
   friend class VMStructs;
@@ -74,53 +65,32 @@
   static const char* _runtime_name;
   static const char* _runtime_version;
 
-  // In this class, we promote the minor version of release to be the
-  // major version for releases >= 5 in anticipation of the JDK doing the
-  // same thing.  For example, we represent "1.5.0" as major version 5 (we
-  // drop the leading 1 and use 5 as the 'major').
-
   uint8_t _major;
   uint8_t _minor;
-  uint8_t _micro;
-  uint8_t _update;
-  uint8_t _special;
+  uint8_t _security;
+  uint8_t _patch;
   uint8_t _build;
 
-  // If partially initialized, the above fields are invalid and we know
-  // that we're less than major version 6.
-  bool _partially_initialized;
-
   bool _thread_park_blocker;
   bool _post_vm_init_hook_enabled;
 
   bool is_valid() const {
-    return (_major != 0 || _partially_initialized);
+    return (_major != 0);
   }
 
   // initializes or partially initializes the _current static field
   static void initialize();
 
-  // Completes initialization for a pre-JDK6 version.
-  static void fully_initialize(uint8_t major, uint8_t minor = 0,
-                               uint8_t micro = 0, uint8_t update = 0);
-
  public:
 
-  // Returns true if the the current version has only been partially initialized
-  static bool is_partially_initialized() {
-    return _current._partially_initialized;
-  }
-
-  JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
-                  _special(0), _build(0), _partially_initialized(false),
+  JDK_Version() : _major(0), _minor(0), _security(0), _patch(0), _build(0),
                   _thread_park_blocker(false), _post_vm_init_hook_enabled(false)
                   {}
 
-  JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
-              uint8_t update = 0, uint8_t special = 0, uint8_t build = 0,
+  JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t security = 0,
+              uint8_t patch = 0, uint8_t build = 0,
               bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) :
-      _major(major), _minor(minor), _micro(micro), _update(update),
-      _special(special), _build(build), _partially_initialized(false),
+      _major(major), _minor(minor), _security(security), _patch(patch), _build(build),
       _thread_park_blocker(thread_park_blocker),
       _post_vm_init_hook_enabled(post_vm_init_hook_enabled)
       {}
@@ -133,15 +103,10 @@
     return JDK_Version(m);
   }
 
-  static JDK_Version jdk_update(uint8_t major, uint8_t update_number) {
-    return JDK_Version(major, 0, 0, update_number);
-  }
-
   uint8_t major_version() const          { return _major; }
   uint8_t minor_version() const          { return _minor; }
-  uint8_t micro_version() const          { return _micro; }
-  uint8_t update_version() const         { return _update; }
-  uint8_t special_update_version() const { return _special; }
+  uint8_t security_version() const       { return _security; }
+  uint8_t patch_version() const          { return _patch; }
   uint8_t build_number() const           { return _build; }
 
   bool supports_thread_park_blocker() const {
@@ -151,7 +116,7 @@
     return _post_vm_init_hook_enabled;
   }
 
-  // Performs a full ordering comparison using all fields (update, build, etc.)
+  // Performs a full ordering comparison using all fields (patch, build, etc.)
   int compare(const JDK_Version& other) const;
 
   /**
@@ -160,16 +125,7 @@
    * equal, and a positive value if it is greater.
    */
   int compare_major(int version) const {
-    if (_partially_initialized) {
-      if (version >= 6) {
-        return -1;
-      } else {
-        assert(false, "Can't make this comparison during init time");
-        return -1; // conservative
-      }
-    } else {
       return major_version() - version;
-    }
   }
 
   void to_string(char* buffer, size_t buflen) const;
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -1239,12 +1239,11 @@
   static_field(Abstract_VM_Version,            _s_internal_vm_info_string,                    const char*)                           \
   static_field(Abstract_VM_Version,            _vm_major_version,                             int)                                   \
   static_field(Abstract_VM_Version,            _vm_minor_version,                             int)                                   \
-  static_field(Abstract_VM_Version,            _vm_micro_version,                             int)                                   \
+  static_field(Abstract_VM_Version,            _vm_security_version,                          int)                                   \
   static_field(Abstract_VM_Version,            _vm_build_number,                              int)                                   \
   static_field(Abstract_VM_Version,            _reserve_for_allocation_prefetch,              int)                                   \
                                                                                                                                      \
   static_field(JDK_Version,                    _current,                                      JDK_Version)                           \
-  nonstatic_field(JDK_Version,                 _partially_initialized,                        bool)                                  \
   nonstatic_field(JDK_Version,                 _major,                                        unsigned char)                         \
                                                                                                                                      \
   /*************************/                                                                                                        \
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -39,78 +39,50 @@
 unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
 int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
 
-#ifndef HOTSPOT_RELEASE_VERSION
-  #error HOTSPOT_RELEASE_VERSION must be defined
+#ifndef HOTSPOT_VERSION_STRING
+  #error HOTSPOT_VERSION_STRING must be defined
 #endif
 
-#ifndef JDK_MAJOR_VERSION
-  #error JDK_MAJOR_VERSION must be defined
+#ifndef VERSION_MAJOR
+  #error VERSION_MAJOR must be defined
 #endif
-#ifndef JDK_MINOR_VERSION
-  #error JDK_MINOR_VERSION must be defined
+#ifndef VERSION_MINOR
+  #error VERSION_MINOR must be defined
 #endif
-#ifndef JDK_MICRO_VERSION
-  #error JDK_MICRO_VERSION must be defined
+#ifndef VERSION_SECURITY
+  #error VERSION_SECURITY must be defined
 #endif
-#ifndef JDK_BUILD_NUMBER
-  #error JDK_BUILD_NUMBER must be defined
+#ifndef VERSION_PATCH
+  #error VERSION_PATCH must be defined
+#endif
+#ifndef VERSION_BUILD
+  #error VERSION_BUILD must be defined
 #endif
 
-#ifndef JRE_RELEASE_VERSION
-  #error JRE_RELEASE_VERSION must be defined
+#ifndef VERSION_STRING
+  #error VERSION_STRING must be defined
 #endif
 
 // NOTE: Builds within Visual Studio do not define the build target in
-//       HOTSPOT_RELEASE_VERSION, so it must be done here
+//       HOTSPOT_VERSION_STRING, so it must be done here
 #if defined(VISUAL_STUDIO_BUILD) && !defined(PRODUCT)
   #ifndef HOTSPOT_BUILD_TARGET
     #error HOTSPOT_BUILD_TARGET must be defined
   #endif
-  #define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
+  #define VM_RELEASE HOTSPOT_VERSION_STRING "-" HOTSPOT_BUILD_TARGET
 #else
-  #define VM_RELEASE HOTSPOT_RELEASE_VERSION
-#endif
-
-// HOTSPOT_RELEASE_VERSION follows the JDK release version naming convention
-// <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]
-int Abstract_VM_Version::_vm_major_version = 0;
-int Abstract_VM_Version::_vm_minor_version = 0;
-int Abstract_VM_Version::_vm_micro_version = 0;
-int Abstract_VM_Version::_vm_build_number = 0;
-bool Abstract_VM_Version::_initialized = false;
-unsigned int Abstract_VM_Version::_parallel_worker_threads = 0;
-bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
-
-#ifdef ASSERT
-static void assert_digits(const char * s, const char * message) {
-  for (int i = 0; s[i] != '\0'; i++) {
-    assert(isdigit(s[i]), message);
-  }
-}
+  #define VM_RELEASE HOTSPOT_VERSION_STRING
 #endif
 
-static void set_version_field(int * version_field, const char * version_str,
-                              const char * const assert_msg) {
-  if (version_str != NULL && *version_str != '\0') {
-    DEBUG_ONLY(assert_digits(version_str, assert_msg));
-    *version_field = atoi(version_str);
-  }
-}
-
-void Abstract_VM_Version::initialize() {
-  if (_initialized) {
-    return;
-  }
-
-  set_version_field(&_vm_major_version, JDK_MAJOR_VERSION, "bad major version");
-  set_version_field(&_vm_minor_version, JDK_MINOR_VERSION, "bad minor version");
-  set_version_field(&_vm_micro_version, JDK_MICRO_VERSION, "bad micro version");
-  int offset = (JDK_BUILD_NUMBER != NULL && JDK_BUILD_NUMBER[0] == 'b') ? 1 : 0;
-  set_version_field(&_vm_build_number, &JDK_BUILD_NUMBER[offset],
-                    "bad build number");
-
-  _initialized = true;
-}
+// HOTSPOT_VERSION_STRING equals the JDK VERSION_STRING (unless overridden
+// in a standalone build).
+int Abstract_VM_Version::_vm_major_version = VERSION_MAJOR;
+int Abstract_VM_Version::_vm_minor_version = VERSION_MINOR;
+int Abstract_VM_Version::_vm_security_version = VERSION_SECURITY;
+int Abstract_VM_Version::_vm_patch_version = VERSION_PATCH;
+int Abstract_VM_Version::_vm_build_number = VERSION_BUILD;
+unsigned int Abstract_VM_Version::_parallel_worker_threads = 0;
+bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
 
 #if defined(_LP64)
   #define VMLP "64-Bit "
@@ -178,7 +150,7 @@
 //       fatal error handlers. if the crash is in native thread,
 //       stringStream cannot get resource allocated and will SEGV.
 const char* Abstract_VM_Version::jre_release_version() {
-  return JRE_RELEASE_VERSION;
+  return VERSION_STRING;
 }
 
 #define OS       LINUX_ONLY("linux")             \
@@ -259,7 +231,7 @@
   #endif
 
   return VMNAME " (" VM_RELEASE ") for " OS "-" CPU FLOAT_ARCH_STR
-         " JRE (" JRE_RELEASE_VERSION "), built on " __DATE__ " " __TIME__
+         " JRE (" VERSION_STRING "), built on " __DATE__ " " __TIME__
          " by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
 }
 
@@ -270,7 +242,7 @@
 unsigned int Abstract_VM_Version::jvm_version() {
   return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
          ((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
-         ((Abstract_VM_Version::vm_micro_version() & 0xFF) << 8) |
+         ((Abstract_VM_Version::vm_security_version() & 0xFF) << 8) |
          (Abstract_VM_Version::vm_build_number() & 0xFF);
 }
 
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Mon Jul 13 13:23:31 2015 -0700
@@ -45,9 +45,9 @@
   static unsigned int _L1_data_cache_line_size;
   static int          _vm_major_version;
   static int          _vm_minor_version;
-  static int          _vm_micro_version;
+  static int          _vm_security_version;
+  static int          _vm_patch_version;
   static int          _vm_build_number;
-  static bool         _initialized;
   static unsigned int _parallel_worker_threads;
   static bool         _parallel_worker_threads_initialized;
   static int          _reserve_for_allocation_prefetch;
@@ -75,10 +75,11 @@
   static const char* vm_platform_string();
   static const char* vm_build_user();
 
-  static int vm_major_version()               { assert(_initialized, "not initialized"); return _vm_major_version; }
-  static int vm_minor_version()               { assert(_initialized, "not initialized"); return _vm_minor_version; }
-  static int vm_micro_version()               { assert(_initialized, "not initialized"); return _vm_micro_version; }
-  static int vm_build_number()                { assert(_initialized, "not initialized"); return _vm_build_number; }
+  static int vm_major_version()               { return _vm_major_version; }
+  static int vm_minor_version()               { return _vm_minor_version; }
+  static int vm_security_version()            { return _vm_security_version; }
+  static int vm_patch_version()               { return _vm_patch_version; }
+  static int vm_build_number()                { return _vm_build_number; }
 
   // Gets the jvm_version_info.jvm_version defined in jvm.h
   static unsigned int jvm_version();
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -170,12 +170,13 @@
   output()->print_cr("%s version %s", Abstract_VM_Version::vm_name(),
           Abstract_VM_Version::vm_release());
   JDK_Version jdk_version = JDK_Version::current();
-  if (jdk_version.update_version() > 0) {
-    output()->print_cr("JDK %d.%d_%02d", jdk_version.major_version(),
-            jdk_version.minor_version(), jdk_version.update_version());
+  if (jdk_version.patch_version() > 0) {
+    output()->print_cr("JDK %d.%d.%d.%d", jdk_version.major_version(),
+            jdk_version.minor_version(), jdk_version.security_version(),
+            jdk_version.patch_version());
   } else {
-    output()->print_cr("JDK %d.%d", jdk_version.major_version(),
-            jdk_version.minor_version());
+    output()->print_cr("JDK %d.%d.%d", jdk_version.major_version(),
+            jdk_version.minor_version(), jdk_version.security_version());
   }
 }
 
--- a/hotspot/src/share/vm/services/management.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/services/management.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -86,10 +86,6 @@
   ClassLoadingService::init();
 #else
   ThreadService::init();
-  // Make sure the VM version is initialized
-  // This is normally called by RuntimeService::init().
-  // Since that is conditionalized out, we need to call it here.
-  Abstract_VM_Version::initialize();
 #endif // INCLUDE_MANAGEMENT
 }
 
--- a/hotspot/src/share/vm/services/runtimeService.cpp	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/src/share/vm/services/runtimeService.cpp	Mon Jul 13 13:23:31 2015 -0700
@@ -42,8 +42,6 @@
 double RuntimeService::_last_safepoint_sync_time_sec = 0.0;
 
 void RuntimeService::init() {
-  // Make sure the VM version is initialized
-  Abstract_VM_Version::initialize();
 
   if (UsePerfData) {
     EXCEPTION_MARK;
--- a/hotspot/test/runtime/6981737/Test6981737.java	Thu Jul 09 13:49:32 2015 -0700
+++ b/hotspot/test/runtime/6981737/Test6981737.java	Mon Jul 13 13:23:31 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,12 +38,13 @@
      */
     public static void main(String[] args) throws Exception {
 
-        String version = verifyProperty("java.version", "[0-9]+\\.[0-9]+\\..*");
-        String major_version_spec = version.split("\\.")[1];
+        String version = verifyProperty("java.version", "[0-9]+[\\\\.[0-9]+]*\\-.*");
+        String version_tokens[] = version.split("-|\\.");
+        String major_version_spec = version_tokens[0];
         int major_version = new Integer(major_version_spec).intValue();
 
         String vendor_re = "Oracle Corporation";
-        String vm_spec_version_re = "1\\." + major_version_spec;
+        String vm_spec_version_re = major_version_spec;
         if (major_version < 7) {
             vendor_re = "Sun Microsystems Inc\\.";
             vm_spec_version_re = "1\\.0";