8085822: JEP 223: New Version-String Scheme (initial integration)
authorihse
Fri, 12 Jun 2015 08:31:01 +0200
changeset 33957 39113ae98993
parent 30850 56166ce66037
child 33958 8d838be4f4ec
8085822: JEP 223: New Version-String Scheme (initial integration) Reviewed-by: erikj, dcubed, dholmes, alanb Contributed-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>, Alejandro E Murillo <alejandro.murillo@oracle.com>
hotspot/make/Makefile
hotspot/make/aix/Makefile
hotspot/make/aix/makefiles/buildtree.make
hotspot/make/aix/makefiles/defs.make
hotspot/make/aix/makefiles/vm.make
hotspot/make/bsd/Makefile
hotspot/make/bsd/makefiles/buildtree.make
hotspot/make/bsd/makefiles/defs.make
hotspot/make/bsd/makefiles/vm.make
hotspot/make/defs.make
hotspot/make/jdk6_hotspot_distro
hotspot/make/jdk_version
hotspot/make/linux/Makefile
hotspot/make/linux/makefiles/buildtree.make
hotspot/make/linux/makefiles/defs.make
hotspot/make/linux/makefiles/vm.make
hotspot/make/solaris/Makefile
hotspot/make/solaris/makefiles/buildtree.make
hotspot/make/solaris/makefiles/defs.make
hotspot/make/solaris/makefiles/sparcWorks.make
hotspot/make/solaris/makefiles/vm.make
hotspot/make/windows/build.make
hotspot/make/windows/makefiles/compile.make
hotspot/make/windows/makefiles/debug.make
hotspot/make/windows/makefiles/defs.make
hotspot/make/windows/makefiles/fastdebug.make
hotspot/make/windows/makefiles/product.make
hotspot/make/windows/makefiles/vm.make
hotspot/make/windows/projectfiles/common/Makefile
hotspot/src/share/vm/prims/jvm.h
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/java.cpp
hotspot/src/share/vm/runtime/java.hpp
hotspot/src/share/vm/runtime/vmStructs.cpp
hotspot/src/share/vm/runtime/vm_version.cpp
hotspot/src/share/vm/runtime/vm_version.hpp
hotspot/test/runtime/6981737/Test6981737.java
--- a/hotspot/make/Makefile	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/Makefile	Fri Jun 12 08:31:01 2015 +0200
@@ -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,13 @@
 #                             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)
 #
 
 # Default is build both product fastdebug and create export area
@@ -853,9 +849,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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/aix/Makefile	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/aix/makefiles/buildtree.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/aix/makefiles/defs.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/aix/makefiles/vm.make	Fri Jun 12 08:31:01 2015 +0200
@@ -74,12 +74,12 @@
 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_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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/bsd/Makefile	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/bsd/makefiles/buildtree.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/bsd/makefiles/defs.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/bsd/makefiles/vm.make	Fri Jun 12 08:31:01 2015 +0200
@@ -73,12 +73,12 @@
 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_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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/defs.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ /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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/jdk_version	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/linux/Makefile	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/linux/makefiles/buildtree.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/linux/makefiles/defs.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/linux/makefiles/vm.make	Fri Jun 12 08:31:01 2015 +0200
@@ -75,12 +75,12 @@
 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_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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/solaris/Makefile	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/solaris/makefiles/buildtree.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/solaris/makefiles/defs.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/solaris/makefiles/vm.make	Fri Jun 12 08:31:01 2015 +0200
@@ -69,12 +69,12 @@
 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_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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/build.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/makefiles/compile.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/makefiles/debug.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/makefiles/defs.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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,17 @@
 # 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_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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/makefiles/fastdebug.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/makefiles/product.make	Fri Jun 12 08:31:01 2015 +0200
@@ -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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/makefiles/vm.make	Fri Jun 12 08:31:01 2015 +0200
@@ -58,12 +58,12 @@
 !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_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 +403,3 @@
 
 vm.def: $(Obj_Files)
 	sh $(WorkSpace)/make/windows/build_vm_def.sh $(BUILD_VM_DEF_FLAG)
-
--- a/hotspot/make/windows/projectfiles/common/Makefile	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/make/windows/projectfiles/common/Makefile	Fri Jun 12 08:31:01 2015 +0200
@@ -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/prims/jvm.h	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvm.h	Fri Jun 12 08:31:01 2015 +0200
@@ -1185,7 +1185,7 @@
  */
 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 jvm_version;
     unsigned int update_version : 8;
     unsigned int special_update_version : 8;
     unsigned int reserved1 : 16;
@@ -1206,7 +1206,7 @@
 
 #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
@@ -1214,7 +1214,7 @@
 
 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) */
+    unsigned int jdk_version;   /* Consists of major, minor, security (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)*/
@@ -1238,9 +1238,9 @@
 
 #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JDK_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
+#define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 
-/* Build number is available only for RE build (i.e. JDK_BUILD_NUMBER is set to bNN)
+/* Build number is available only for RE build.
  * It will be zero for internal builds.
  */
 #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Fri Jun 12 08:31:01 2015 +0200
@@ -220,12 +220,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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/runtime/java.cpp	Fri Jun 12 08:31:01 2015 +0200
@@ -643,20 +643,15 @@
 
     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 security = JDK_VERSION_SECURITY(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,
+    _current = JDK_Version(major, minor, security, info.update_version,
                            info.special_update_version, build,
                            info.thread_park_blocker == 1,
                            info.post_vm_init_hook_enabled == 1);
@@ -664,18 +659,18 @@
 }
 
 void JDK_Version::fully_initialize(
-    uint8_t major, uint8_t minor, uint8_t micro, uint8_t update) {
+    uint8_t major, uint8_t minor, uint8_t security, 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;
+    security = minor;
     minor = major;
     major = 1;
   }
-  _current = JDK_Version(major, minor, micro, update);
+  _current = JDK_Version(major, minor, security, update);
 }
 
 void JDK_Version_init() {
@@ -686,7 +681,7 @@
   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.security_version()       << (BitsPerByte * 3)) |
     ((int64_t)v.update_version()         << (BitsPerByte * 2)) |
     ((int64_t)v.special_update_version() << (BitsPerByte * 1)) |
     ((int64_t)v.build_number()           << (BitsPerByte * 0));
@@ -722,8 +717,8 @@
         &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);
--- a/hotspot/src/share/vm/runtime/java.hpp	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/runtime/java.hpp	Fri Jun 12 08:31:01 2015 +0200
@@ -81,7 +81,7 @@
 
   uint8_t _major;
   uint8_t _minor;
-  uint8_t _micro;
+  uint8_t _security;
   uint8_t _update;
   uint8_t _special;
   uint8_t _build;
@@ -102,7 +102,7 @@
 
   // 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);
+                               uint8_t security = 0, uint8_t update = 0);
 
  public:
 
@@ -111,15 +111,15 @@
     return _current._partially_initialized;
   }
 
-  JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
+  JDK_Version() : _major(0), _minor(0), _security(0), _update(0),
                   _special(0), _build(0), _partially_initialized(false),
                   _thread_park_blocker(false), _post_vm_init_hook_enabled(false)
                   {}
 
-  JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
+  JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t security = 0,
               uint8_t update = 0, uint8_t special = 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),
+      _major(major), _minor(minor), _security(security), _update(update),
       _special(special), _build(build), _partially_initialized(false),
       _thread_park_blocker(thread_park_blocker),
       _post_vm_init_hook_enabled(post_vm_init_hook_enabled)
@@ -139,7 +139,7 @@
 
   uint8_t major_version() const          { return _major; }
   uint8_t minor_version() const          { return _minor; }
-  uint8_t micro_version() const          { return _micro; }
+  uint8_t security_version() const          { return _security; }
   uint8_t update_version() const         { return _update; }
   uint8_t special_update_version() const { return _special; }
   uint8_t build_number() const           { return _build; }
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Fri Jun 12 08:31:01 2015 +0200
@@ -1237,7 +1237,7 @@
   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)                                   \
                                                                                                                                      \
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Fri Jun 12 08:31:01 2015 +0200
@@ -39,76 +39,54 @@
 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_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
+  #define VM_RELEASE HOTSPOT_VERSION_STRING
 #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;
+// 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_build_number = VERSION_BUILD;
 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);
-  }
-}
-#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() {
+  // FIXME: Initialization can probably be removed now.
   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;
 }
 
@@ -178,7 +156,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 +237,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 +248,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	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Fri Jun 12 08:31:01 2015 +0200
@@ -45,7 +45,7 @@
   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_build_number;
   static bool         _initialized;
   static unsigned int _parallel_worker_threads;
@@ -70,7 +70,7 @@
 
   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_security_version()            { assert(_initialized, "not initialized"); return _vm_security_version; }
   static int vm_build_number()                { assert(_initialized, "not initialized"); return _vm_build_number; }
 
   // Gets the jvm_version_info.jvm_version defined in jvm.h
--- a/hotspot/test/runtime/6981737/Test6981737.java	Wed Jul 05 20:36:16 2017 +0200
+++ b/hotspot/test/runtime/6981737/Test6981737.java	Fri Jun 12 08:31:01 2015 +0200
@@ -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";