changeset 34016:bd99d71c5ac3

Merge
author duke
date Wed, 05 Jul 2017 21:03:29 +0200
parents 67e86f2e3448 236faf4ebfe4
children 7a2a042095b9
files common/bin/test_builds.sh hotspot/make/jdk6_hotspot_distro
diffstat 63 files changed, 1672 insertions(+), 1958 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags-top-repo	Sun Nov 29 20:29:45 2015 -0800
+++ b/.hgtags-top-repo	Wed Jul 05 21:03:29 2017 +0200
@@ -336,3 +336,4 @@
 122142a185381ce5cea959bf13b923d8cc333628 jdk9-b91
 106c06398f7ab330eef9e335fbd3a5a8ead23b77 jdk9-b92
 331fda57dfd323c61804ba0472776790de572937 jdk9-b93
+349488425abcaf3ff62f580007860b4b56875d10 jdk9-b94
--- a/common/autoconf/boot-jdk.m4	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/boot-jdk.m4	Wed Jul 05 21:03:29 2017 +0200
@@ -77,7 +77,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          [FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`]
+          [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`]
           if test "x$FOUND_CORRECT_VERSION" = x; then
             AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
             AC_MSG_NOTICE([(Your Boot JDK must be version 8 or 9)])
--- a/common/autoconf/configure.ac	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/configure.ac	Wed Jul 05 21:03:29 2017 +0200
@@ -45,6 +45,7 @@
 m4_include([flags.m4])
 m4_include([help.m4])
 m4_include([jdk-options.m4])
+m4_include([jdk-version.m4])
 m4_include([libraries.m4])
 m4_include([platform.m4])
 m4_include([source-dirs.m4])
@@ -128,7 +129,7 @@
 
 # We need build & target for this.
 JDKOPT_SETUP_JDK_OPTIONS
-JDKOPT_SETUP_JDK_VERSION_NUMBERS
+JDKVER_SETUP_JDK_VERSION_NUMBERS
 
 ###############################################################################
 #
--- a/common/autoconf/flags.m4	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/flags.m4	Wed Jul 05 21:03:29 2017 +0200
@@ -191,13 +191,13 @@
     # The \$ are escaped to the shell, and the $(...) variables
     # are evaluated by make.
     RC_FLAGS="$RC_FLAGS \
-        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
+        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
   fi
   AC_SUBST(RC_FLAGS)
 
@@ -666,10 +666,6 @@
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
-  # Setup release name
-  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-
-
   # Set some additional per-OS defines.
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
--- a/common/autoconf/generated-configure.sh	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 21:03:29 2017 +0200
@@ -825,9 +825,18 @@
 BOOT_JDK
 JAVA_CHECK
 JAVAC_CHECK
-COOKED_BUILD_NUMBER
-JDK_VERSION
-COPYRIGHT_YEAR
+VERSION_IS_GA
+VERSION_SHORT
+VERSION_STRING
+VERSION_NUMBER_FOUR_POSITIONS
+VERSION_NUMBER
+VERSION_OPT
+VERSION_BUILD
+VERSION_PRE
+VERSION_PATCH
+VERSION_SECURITY
+VERSION_MINOR
+VERSION_MAJOR
 MACOSX_BUNDLE_ID_BASE
 MACOSX_BUNDLE_NAME_BASE
 COMPANY_NAME
@@ -835,13 +844,7 @@
 PRODUCT_SUFFIX
 PRODUCT_NAME
 LAUNCHER_NAME
-MILESTONE
-JDK_BUILD_NUMBER
-JDK_UPDATE_VERSION
-JDK_MICRO_VERSION
-JDK_MINOR_VERSION
-JDK_MAJOR_VERSION
-USER_RELEASE_SUFFIX
+COPYRIGHT_YEAR
 COMPRESS_JARS
 UNLIMITED_CRYPTO
 CACERTS_FILE
@@ -1058,11 +1061,19 @@
 enable_hotspot_test_in_build
 with_cacerts_file
 enable_unlimited_crypto
+with_copyright_year
 with_milestone
 with_update_version
 with_user_release_suffix
 with_build_number
-with_copyright_year
+with_version_string
+with_version_pre
+with_version_opt
+with_version_build
+with_version_major
+with_version_minor
+with_version_security
+with_version_patch
 with_boot_jdk
 with_add_source_root
 with_override_source_root
@@ -1906,13 +1917,31 @@
   --with-output-sync      set make output sync type if supported by make.
                           [recurse]
   --with-cacerts-file     specify alternative cacerts file
-  --with-milestone        Set milestone value for build [internal]
-  --with-update-version   Set update version value for build [b00]
+  --with-copyright-year   Set copyright year value for build [current year]
+  --with-milestone        Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-update-version   Deprecated. Option is kept for backwards
+                          compatibility and is ignored
   --with-user-release-suffix
-                          Add a custom string to the version string if build
-                          number is not set.[username_builddateb00]
-  --with-build-number     Set build number value for build [b00]
-  --with-copyright-year   Set copyright year value for build [current year]
+                          Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-build-number     Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-version-string   Set version string [calculated]
+  --with-version-pre      Set the base part of the version 'PRE' field
+                          (pre-release identifier) ['internal']
+  --with-version-opt      Set version 'OPT' field (build metadata)
+                          [<timestamp>.<user>.<dirname>]
+  --with-version-build    Set version 'BUILD' field (build number) [not
+                          specified]
+  --with-version-major    Set version 'MAJOR' field (first number) [current
+                          source value]
+  --with-version-minor    Set version 'MINOR' field (second number) [current
+                          source value]
+  --with-version-security Set version 'SECURITY' field (third number) [current
+                          source value]
+  --with-version-patch    Set version 'PATCH' field (fourth number) [not
+                          specified]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-add-source-root  Deprecated. Option is kept for backwards
                           compatibility and is ignored
@@ -3976,20 +4005,60 @@
 
 
 
+
+
 ###############################################################################
 #
+# Enable or disable the elliptic curve crypto implementation
+#
+
+
+
+
+
+################################################################################
+#
+# Gcov coverage data for hotspot
+#
+
+
+#
+# Copyright (c) 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+###############################################################################
+#
 # Setup version numbers
 #
 
-
-
-
-
-
-################################################################################
-#
-# Gcov coverage data for hotspot
-#
+# Verify that a given string represents a valid version number, and assign it
+# to a variable.
+
+# Argument 1: the variable to assign to
+# Argument 2: the value given by the user
+
+
 
 
 ################################################################################
@@ -4610,7 +4679,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1446762265
+DATE_WHEN_GENERATED=1447737510
 
 ###############################################################################
 #
@@ -23047,106 +23116,13 @@
 
   ###############################################################################
   #
-  # Enable or disable the elliptic curve crypto implementation
-  #
-
-
-  ###############################################################################
-  #
   # Compress jars
   #
   COMPRESS_JARS=false
 
 
 
-
-  # Source the version numbers
-  . $AUTOCONF_DIR/version-numbers
-
-  # Get the settings from parameters
-
-# Check whether --with-milestone was given.
-if test "${with_milestone+set}" = set; then :
-  withval=$with_milestone;
-fi
-
-  if test "x$with_milestone" = xyes; then
-    as_fn_error $? "Milestone must have a value" "$LINENO" 5
-  elif test "x$with_milestone" != x; then
-    MILESTONE="$with_milestone"
-  fi
-  if test "x$MILESTONE" = x; then
-    MILESTONE=internal
-  fi
-
-
-# Check whether --with-update-version was given.
-if test "${with_update_version+set}" = set; then :
-  withval=$with_update_version;
-fi
-
-  if test "x$with_update_version" = xyes; then
-    as_fn_error $? "Update version must have a value" "$LINENO" 5
-  elif test "x$with_update_version" != x; then
-    JDK_UPDATE_VERSION="$with_update_version"
-    # On macosx 10.7, it's not possible to set --with-update-version=0X due
-    # to a bug in expr (which reduces it to just X). To work around this, we
-    # always add a 0 to one digit update versions.
-    if test "${#JDK_UPDATE_VERSION}" = "1"; then
-      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
-    fi
-  fi
-
-
-# Check whether --with-user-release-suffix was given.
-if test "${with_user_release_suffix+set}" = set; then :
-  withval=$with_user_release_suffix;
-fi
-
-  if test "x$with_user_release_suffix" = xyes; then
-    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
-  elif test "x$with_user_release_suffix" != x; then
-    USER_RELEASE_SUFFIX="$with_user_release_suffix"
-  fi
-
-
-# Check whether --with-build-number was given.
-if test "${with_build_number+set}" = set; then :
-  withval=$with_build_number;
-fi
-
-  if test "x$with_build_number" = xyes; then
-    as_fn_error $? "Build number must have a value" "$LINENO" 5
-  elif test "x$with_build_number" != x; then
-    JDK_BUILD_NUMBER="$with_build_number"
-  fi
-  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
-  if test "x$JDK_BUILD_NUMBER" = x; then
-    JDK_BUILD_NUMBER=b00
-    if test "x$USER_RELEASE_SUFFIX" = x; then
-      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-      # Avoid [:alnum:] since it depends on the locale.
-      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
-      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-    fi
-  fi
-
-  # Now set the JDK version, milestone, build number etc.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+  # Setup default copyright year. Mostly overridden when building close to a new year.
 
 # Check whether --with-copyright-year was given.
 if test "${with_copyright_year+set}" = set; then :
@@ -23162,14 +23138,442 @@
   fi
 
 
-  if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-  else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-  fi
-
-
-  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+
+  # Warn user that old version arguments are deprecated.
+
+
+# Check whether --with-milestone was given.
+if test "${with_milestone+set}" = set; then :
+  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
+fi
+
+
+
+
+# Check whether --with-update-version was given.
+if test "${with_update_version+set}" = set; then :
+  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
+fi
+
+
+
+
+# Check whether --with-user-release-suffix was given.
+if test "${with_user_release_suffix+set}" = set; then :
+  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
+fi
+
+
+
+
+# Check whether --with-build-number was given.
+if test "${with_build_number+set}" = set; then :
+  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
+fi
+
+
+
+  # Source the version numbers file
+  . $AUTOCONF_DIR/version-numbers
+
+  # Some non-version number information is set in that file
+
+
+
+
+
+
+
+
+  # Override version from arguments
+
+  # If --with-version-string is set, process it first. It is possible to
+  # override parts with more specific flags, since these are processed later.
+
+# Check whether --with-version-string was given.
+if test "${with_version_string+set}" = set; then :
+  withval=$with_version_string;
+fi
+
+  if test "x$with_version_string" = xyes; then
+    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
+  elif test "x$with_version_string" != x; then
+    # Additional [] needed to keep m4 from mangling shell constructs.
+    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
+      VERSION_MAJOR=${BASH_REMATCH[1]}
+      VERSION_MINOR=${BASH_REMATCH[3]}
+      VERSION_SECURITY=${BASH_REMATCH[5]}
+      VERSION_PATCH=${BASH_REMATCH[7]}
+      VERSION_PRE=${BASH_REMATCH[9]}
+      version_plus_separator=${BASH_REMATCH[11]}
+      VERSION_BUILD=${BASH_REMATCH[12]}
+      VERSION_OPT=${BASH_REMATCH[14]}
+      # Unspecified numerical fields are interpreted as 0.
+      if test "x$VERSION_MINOR" = x; then
+        VERSION_MINOR=0
+      fi
+      if test "x$VERSION_SECURITY" = x; then
+        VERSION_SECURITY=0
+      fi
+      if test "x$VERSION_PATCH" = x; then
+        VERSION_PATCH=0
+      fi
+      if test "x$version_plus_separator" != x \
+          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
+        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
+      fi
+      # Stop the version part process from setting default values.
+      # We still allow them to explicitely override though.
+      NO_DEFAULT_VERSION_PARTS=true
+    else
+      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
+    fi
+  fi
+
+
+# Check whether --with-version-pre was given.
+if test "${with_version_pre+set}" = set; then :
+  withval=$with_version_pre; with_version_pre_present=true
+else
+  with_version_pre_present=false
+fi
+
+
+  if test "x$with_version_pre_present" = xtrue; then
+    if test "x$with_version_pre" = xyes; then
+      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
+    elif test "x$with_version_pre" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_PRE=
+    else
+      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
+       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
+      if test "x$VERSION_PRE" != "x$with_version_pre"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
+$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to use "internal" as pre
+      VERSION_PRE="internal"
+    fi
+  fi
+
+
+# Check whether --with-version-opt was given.
+if test "${with_version_opt+set}" = set; then :
+  withval=$with_version_opt; with_version_opt_present=true
+else
+  with_version_opt_present=false
+fi
+
+
+  if test "x$with_version_opt_present" = xtrue; then
+    if test "x$with_version_opt" = xyes; then
+      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
+    elif test "x$with_version_opt" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_OPT=
+    else
+      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
+       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
+      if test "x$VERSION_OPT" != "x$with_version_opt"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
+$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
+      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
+      # Outer [ ] to quote m4.
+       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
+       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
+      VERSION_OPT="$timestamp.$username.$basedirname"
+    fi
+  fi
+
+
+# Check whether --with-version-build was given.
+if test "${with_version_build+set}" = set; then :
+  withval=$with_version_build; with_version_build_present=true
+else
+  with_version_build_present=false
+fi
+
+
+  if test "x$with_version_build_present" = xtrue; then
+    if test "x$with_version_build" = xyes; then
+      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
+    elif test "x$with_version_build" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_BUILD=
+    elif test "x$with_version_build" = x; then
+      VERSION_BUILD=
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_build"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_BUILD=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to not have a build number.
+      VERSION_BUILD=""
+      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
+      VERSION_BUILD=0
+    fi
+  fi
+
+
+# Check whether --with-version-major was given.
+if test "${with_version_major+set}" = set; then :
+  withval=$with_version_major; with_version_major_present=true
+else
+  with_version_major_present=false
+fi
+
+
+  if test "x$with_version_major_present" = xtrue; then
+    if test "x$with_version_major" = xyes; then
+      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_major"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_MAJOR=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to get value from version-numbers
+      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
+    fi
+  fi
+
+
+# Check whether --with-version-minor was given.
+if test "${with_version_minor+set}" = set; then :
+  withval=$with_version_minor; with_version_minor_present=true
+else
+  with_version_minor_present=false
+fi
+
+
+  if test "x$with_version_minor_present" = xtrue; then
+    if test "x$with_version_minor" = xyes; then
+      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
+    elif test "x$with_version_minor" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_MINOR=0
+    elif test "x$with_version_minor" = x; then
+      VERSION_MINOR=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_minor"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_MINOR=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_MINOR=0
+    fi
+  fi
+
+
+# Check whether --with-version-security was given.
+if test "${with_version_security+set}" = set; then :
+  withval=$with_version_security; with_version_security_present=true
+else
+  with_version_security_present=false
+fi
+
+
+  if test "x$with_version_security_present" = xtrue; then
+    if test "x$with_version_security" = xyes; then
+      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
+    elif test "x$with_version_security" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_SECURITY=0
+    elif test "x$with_version_security" = x; then
+      VERSION_SECURITY=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_security"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_SECURITY=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_SECURITY=0
+    fi
+  fi
+
+
+# Check whether --with-version-patch was given.
+if test "${with_version_patch+set}" = set; then :
+  withval=$with_version_patch; with_version_patch_present=true
+else
+  with_version_patch_present=false
+fi
+
+
+  if test "x$with_version_patch_present" = xtrue; then
+    if test "x$with_version_patch" = xyes; then
+      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
+    elif test "x$with_version_patch" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_PATCH=0
+    elif test "x$with_version_patch" = x; then
+      VERSION_PATCH=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_patch"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_PATCH=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_PATCH=0
+    fi
+  fi
+
+  # Calculate derived version properties
+
+  # Set VERSION_IS_GA based on if VERSION_PRE has a value
+  if test "x$VERSION_PRE" = x; then
+    VERSION_IS_GA=true
+  else
+    VERSION_IS_GA=false
+  fi
+
+  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
+  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
+
+  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
+  # Strip trailing zeroes from stripped_version_number
+  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
+  VERSION_NUMBER=$stripped_version_number
+
+  # The complete version string, with additional build information
+  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+  else
+    # If either build or opt is set, we need a + separator
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
+  fi
+
+  # The short version string, just VERSION_NUMBER and PRE, if present.
+  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
+$as_echo_n "checking for version string... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
+$as_echo "$VERSION_STRING" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -23226,7 +23630,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23422,7 +23826,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23606,7 +24010,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23789,7 +24193,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -23972,7 +24376,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24146,7 +24550,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24465,7 +24869,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -24790,7 +25194,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25002,7 +25406,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25179,7 +25583,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25384,7 +25788,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25561,7 +25965,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25766,7 +26170,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -25943,7 +26347,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -26148,7 +26552,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -26325,7 +26729,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -26517,7 +26921,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -26692,7 +27096,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -26885,7 +27289,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -27060,7 +27464,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -27252,7 +27656,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -27427,7 +27831,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -27620,7 +28024,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -27795,7 +28199,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -27969,7 +28373,7 @@
           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
 
           # Extra M4 quote needed to protect [] in grep expression.
-          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
+          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
           if test "x$FOUND_CORRECT_VERSION" = x; then
             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
@@ -43706,13 +44110,13 @@
     # The \$ are escaped to the shell, and the $(...) variables
     # are evaluated by make.
     RC_FLAGS="$RC_FLAGS \
-        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
+        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
   fi
 
 
@@ -44845,10 +45249,6 @@
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
-  # Setup release name
-  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-
-
   # Set some additional per-OS defines.
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
@@ -54488,18 +54888,18 @@
 
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
 
-    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
-      ENABLE_INTREE_EC=yes
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
+    ENABLE_INTREE_EC=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    else
-      ENABLE_INTREE_EC=no
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
+  else
+    ENABLE_INTREE_EC=no
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
 
 
 
@@ -56628,6 +57028,7 @@
   printf "* JDK variant:    $JDK_VARIANT\n"
   printf "* JVM variants:   $with_jvm_variants\n"
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
 
   printf "\n"
   printf "Tools summary:\n"
--- a/common/autoconf/help.m4	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/help.m4	Wed Jul 05 21:03:29 2017 +0200
@@ -202,6 +202,7 @@
   printf "* JDK variant:    $JDK_VARIANT\n"
   printf "* JVM variants:   $with_jvm_variants\n"
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
 
   printf "\n"
   printf "Tools summary:\n"
--- a/common/autoconf/jdk-options.m4	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/jdk-options.m4	Wed Jul 05 21:03:29 2017 +0200
@@ -436,109 +436,13 @@
 
   ###############################################################################
   #
-  # Enable or disable the elliptic curve crypto implementation
-  #
-  AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
-  [
-    AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
-
-    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
-      ENABLE_INTREE_EC=yes
-      AC_MSG_RESULT([yes])
-    else
-      ENABLE_INTREE_EC=no
-      AC_MSG_RESULT([no])
-    fi
-
-    AC_SUBST(ENABLE_INTREE_EC)
-  ])
-
-  ###############################################################################
-  #
   # Compress jars
   #
   COMPRESS_JARS=false
 
   AC_SUBST(COMPRESS_JARS)
-])
 
-###############################################################################
-#
-# Setup version numbers
-#
-AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
-[
-  # Source the version numbers
-  . $AUTOCONF_DIR/version-numbers
-
-  # Get the settings from parameters
-  AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
-      [Set milestone value for build @<:@internal@:>@])])
-  if test "x$with_milestone" = xyes; then
-    AC_MSG_ERROR([Milestone must have a value])
-  elif test "x$with_milestone" != x; then
-    MILESTONE="$with_milestone"
-  fi
-  if test "x$MILESTONE" = x; then
-    MILESTONE=internal
-  fi
-
-  AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
-      [Set update version value for build @<:@b00@:>@])])
-  if test "x$with_update_version" = xyes; then
-    AC_MSG_ERROR([Update version must have a value])
-  elif test "x$with_update_version" != x; then
-    JDK_UPDATE_VERSION="$with_update_version"
-    # On macosx 10.7, it's not possible to set --with-update-version=0X due
-    # to a bug in expr (which reduces it to just X). To work around this, we
-    # always add a 0 to one digit update versions.
-    if test "${#JDK_UPDATE_VERSION}" = "1"; then
-      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
-    fi
-  fi
-
-  AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
-      [Add a custom string to the version string if build number is not set.@<:@username_builddateb00@:>@])])
-  if test "x$with_user_release_suffix" = xyes; then
-    AC_MSG_ERROR([Release suffix must have a value])
-  elif test "x$with_user_release_suffix" != x; then
-    USER_RELEASE_SUFFIX="$with_user_release_suffix"
-  fi
-
-  AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
-      [Set build number value for build @<:@b00@:>@])])
-  if test "x$with_build_number" = xyes; then
-    AC_MSG_ERROR([Build number must have a value])
-  elif test "x$with_build_number" != x; then
-    JDK_BUILD_NUMBER="$with_build_number"
-  fi
-  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
-  if test "x$JDK_BUILD_NUMBER" = x; then
-    JDK_BUILD_NUMBER=b00
-    if test "x$USER_RELEASE_SUFFIX" = x; then
-      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-      # Avoid [:alnum:] since it depends on the locale.
-      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
-      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-    fi
-  fi
-
-  # Now set the JDK version, milestone, build number etc.
-  AC_SUBST(USER_RELEASE_SUFFIX)
-  AC_SUBST(JDK_MAJOR_VERSION)
-  AC_SUBST(JDK_MINOR_VERSION)
-  AC_SUBST(JDK_MICRO_VERSION)
-  AC_SUBST(JDK_UPDATE_VERSION)
-  AC_SUBST(JDK_BUILD_NUMBER)
-  AC_SUBST(MILESTONE)
-  AC_SUBST(LAUNCHER_NAME)
-  AC_SUBST(PRODUCT_NAME)
-  AC_SUBST(PRODUCT_SUFFIX)
-  AC_SUBST(JDK_RC_PLATFORM_NAME)
-  AC_SUBST(COMPANY_NAME)
-  AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
-  AC_SUBST(MACOSX_BUNDLE_ID_BASE)
-
+  # Setup default copyright year. Mostly overridden when building close to a new year.
   AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
       [Set copyright year value for build @<:@current year@:>@])])
   if test "x$with_copyright_year" = xyes; then
@@ -549,16 +453,6 @@
     COPYRIGHT_YEAR=`date +'%Y'`
   fi
   AC_SUBST(COPYRIGHT_YEAR)
-
-  if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-  else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-  fi
-  AC_SUBST(JDK_VERSION)
-
-  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
-  AC_SUBST(COOKED_BUILD_NUMBER)
 ])
 
 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
@@ -574,6 +468,26 @@
   AC_SUBST(SALIB_NAME)
 ])
 
+###############################################################################
+#
+# Enable or disable the elliptic curve crypto implementation
+#
+AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
+[
+  AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
+
+  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
+    ENABLE_INTREE_EC=yes
+    AC_MSG_RESULT([yes])
+  else
+    ENABLE_INTREE_EC=no
+    AC_MSG_RESULT([no])
+  fi
+
+  AC_SUBST(ENABLE_INTREE_EC)
+])
+
+
 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
 [
   #
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/jdk-version.m4	Wed Jul 05 21:03:29 2017 +0200
@@ -0,0 +1,321 @@
+#
+# Copyright (c) 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+###############################################################################
+#
+# Setup version numbers
+#
+
+# Verify that a given string represents a valid version number, and assign it
+# to a variable.
+
+# Argument 1: the variable to assign to
+# Argument 2: the value given by the user
+AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
+[
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then
+    AC_MSG_ERROR(["$2" is not a valid numerical value for $1])
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[[1]]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[[2]]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    AC_MSG_ERROR([$1 is given as $2. This is greater than 255 which is not allowed.])
+  fi
+  if test "x$cleaned_value" != "x$2"; then
+    AC_MSG_WARN([Value for $1 has been sanitized from '$2' to '$cleaned_value'])
+  fi
+  $1=$cleaned_value
+])
+
+AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
+[
+  # Warn user that old version arguments are deprecated.
+  BASIC_DEPRECATED_ARG_WITH([milestone])
+  BASIC_DEPRECATED_ARG_WITH([update-version])
+  BASIC_DEPRECATED_ARG_WITH([user-release-suffix])
+  BASIC_DEPRECATED_ARG_WITH([build-number])
+
+  # Source the version numbers file
+  . $AUTOCONF_DIR/version-numbers
+
+  # Some non-version number information is set in that file
+  AC_SUBST(LAUNCHER_NAME)
+  AC_SUBST(PRODUCT_NAME)
+  AC_SUBST(PRODUCT_SUFFIX)
+  AC_SUBST(JDK_RC_PLATFORM_NAME)
+  AC_SUBST(COMPANY_NAME)
+  AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
+  AC_SUBST(MACOSX_BUNDLE_ID_BASE)
+
+  # Override version from arguments
+
+  # If --with-version-string is set, process it first. It is possible to
+  # override parts with more specific flags, since these are processed later.
+  AC_ARG_WITH(version-string, [AS_HELP_STRING([--with-version-string],
+      [Set version string @<:@calculated@:>@])])
+  if test "x$with_version_string" = xyes; then
+    AC_MSG_ERROR([--with-version-string must have a value])
+  elif test "x$with_version_string" != x; then
+    # Additional [] needed to keep m4 from mangling shell constructs.
+    if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
+      VERSION_MAJOR=${BASH_REMATCH[[1]]}
+      VERSION_MINOR=${BASH_REMATCH[[3]]}
+      VERSION_SECURITY=${BASH_REMATCH[[5]]}
+      VERSION_PATCH=${BASH_REMATCH[[7]]}
+      VERSION_PRE=${BASH_REMATCH[[9]]}
+      version_plus_separator=${BASH_REMATCH[[11]]}
+      VERSION_BUILD=${BASH_REMATCH[[12]]}
+      VERSION_OPT=${BASH_REMATCH[[14]]}
+      # Unspecified numerical fields are interpreted as 0.
+      if test "x$VERSION_MINOR" = x; then
+        VERSION_MINOR=0
+      fi
+      if test "x$VERSION_SECURITY" = x; then
+        VERSION_SECURITY=0
+      fi
+      if test "x$VERSION_PATCH" = x; then
+        VERSION_PATCH=0
+      fi
+      if test "x$version_plus_separator" != x \
+          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
+        AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing])
+      fi
+      # Stop the version part process from setting default values.
+      # We still allow them to explicitely override though.
+      NO_DEFAULT_VERSION_PARTS=true
+    else
+      AC_MSG_ERROR([--with-version-string fails to parse as a valid version string: $with_version_string])
+    fi
+  fi
+
+  AC_ARG_WITH(version-pre, [AS_HELP_STRING([--with-version-pre],
+      [Set the base part of the version 'PRE' field (pre-release identifier) @<:@'internal'@:>@])],
+      [with_version_pre_present=true], [with_version_pre_present=false])
+
+  if test "x$with_version_pre_present" = xtrue; then
+    if test "x$with_version_pre" = xyes; then
+      AC_MSG_ERROR([--with-version-pre must have a value])
+    elif test "x$with_version_pre" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_PRE=
+    else
+      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
+      [ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'` ]
+      if test "x$VERSION_PRE" != "x$with_version_pre"; then
+        AC_MSG_WARN([--with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'])
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to use "internal" as pre
+      VERSION_PRE="internal"
+    fi
+  fi
+
+  AC_ARG_WITH(version-opt, [AS_HELP_STRING([--with-version-opt],
+      [Set version 'OPT' field (build metadata) @<:@<timestamp>.<user>.<dirname>@:>@])],
+      [with_version_opt_present=true], [with_version_opt_present=false])
+
+  if test "x$with_version_opt_present" = xtrue; then
+    if test "x$with_version_opt" = xyes; then
+      AC_MSG_ERROR([--with-version-opt must have a value])
+    elif test "x$with_version_opt" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_OPT=
+    else
+      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
+      [ VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'` ]
+      if test "x$VERSION_OPT" != "x$with_version_opt"; then
+        AC_MSG_WARN([--with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'])
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
+      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
+      # Outer [ ] to quote m4.
+      [ username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
+      [ basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'` ]
+      VERSION_OPT="$timestamp.$username.$basedirname"
+    fi
+  fi
+
+  AC_ARG_WITH(version-build, [AS_HELP_STRING([--with-version-build],
+      [Set version 'BUILD' field (build number) @<:@not specified@:>@])],
+      [with_version_build_present=true], [with_version_build_present=false])
+
+  if test "x$with_version_build_present" = xtrue; then
+    if test "x$with_version_build" = xyes; then
+      AC_MSG_ERROR([--with-version-build must have a value])
+    elif test "x$with_version_build" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_BUILD=
+    elif test "x$with_version_build" = x; then
+      VERSION_BUILD=
+    else
+      JDKVER_CHECK_AND_SET_NUMBER(VERSION_BUILD, $with_version_build)
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to not have a build number.
+      VERSION_BUILD=""
+      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
+      VERSION_BUILD=0
+    fi
+  fi
+
+  AC_ARG_WITH(version-major, [AS_HELP_STRING([--with-version-major],
+      [Set version 'MAJOR' field (first number) @<:@current source value@:>@])],
+      [with_version_major_present=true], [with_version_major_present=false])
+
+  if test "x$with_version_major_present" = xtrue; then
+    if test "x$with_version_major" = xyes; then
+      AC_MSG_ERROR([--with-version-major must have a value])
+    else
+      JDKVER_CHECK_AND_SET_NUMBER(VERSION_MAJOR, $with_version_major)
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to get value from version-numbers
+      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
+    fi
+  fi
+
+  AC_ARG_WITH(version-minor, [AS_HELP_STRING([--with-version-minor],
+      [Set version 'MINOR' field (second number) @<:@current source value@:>@])],
+      [with_version_minor_present=true], [with_version_minor_present=false])
+
+  if test "x$with_version_minor_present" = xtrue; then
+    if test "x$with_version_minor" = xyes; then
+      AC_MSG_ERROR([--with-version-minor must have a value])
+    elif test "x$with_version_minor" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_MINOR=0
+    elif test "x$with_version_minor" = x; then
+      VERSION_MINOR=0
+    else
+      JDKVER_CHECK_AND_SET_NUMBER(VERSION_MINOR, $with_version_minor)
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_MINOR=0
+    fi
+  fi
+
+  AC_ARG_WITH(version-security, [AS_HELP_STRING([--with-version-security],
+      [Set version 'SECURITY' field (third number) @<:@current source value@:>@])],
+      [with_version_security_present=true], [with_version_security_present=false])
+
+  if test "x$with_version_security_present" = xtrue; then
+    if test "x$with_version_security" = xyes; then
+      AC_MSG_ERROR([--with-version-security must have a value])
+    elif test "x$with_version_security" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_SECURITY=0
+    elif test "x$with_version_security" = x; then
+      VERSION_SECURITY=0
+    else
+      JDKVER_CHECK_AND_SET_NUMBER(VERSION_SECURITY, $with_version_security)
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_SECURITY=0
+    fi
+  fi
+
+  AC_ARG_WITH(version-patch, [AS_HELP_STRING([--with-version-patch],
+      [Set version 'PATCH' field (fourth number) @<:@not specified@:>@])],
+      [with_version_patch_present=true], [with_version_patch_present=false])
+
+  if test "x$with_version_patch_present" = xtrue; then
+    if test "x$with_version_patch" = xyes; then
+      AC_MSG_ERROR([--with-version-patch must have a value])
+    elif test "x$with_version_patch" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_PATCH=0
+    elif test "x$with_version_patch" = x; then
+      VERSION_PATCH=0
+    else
+      JDKVER_CHECK_AND_SET_NUMBER(VERSION_PATCH, $with_version_patch)
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_PATCH=0
+    fi
+  fi
+
+  # Calculate derived version properties
+
+  # Set VERSION_IS_GA based on if VERSION_PRE has a value
+  if test "x$VERSION_PRE" = x; then
+    VERSION_IS_GA=true
+  else
+    VERSION_IS_GA=false
+  fi
+
+  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
+  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
+
+  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
+  # Strip trailing zeroes from stripped_version_number
+  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
+  VERSION_NUMBER=$stripped_version_number
+
+  # The complete version string, with additional build information
+  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+  else
+    # If either build or opt is set, we need a + separator
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
+  fi
+
+  # The short version string, just VERSION_NUMBER and PRE, if present.
+  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+
+  AC_MSG_CHECKING([for version string])
+  AC_MSG_RESULT([$VERSION_STRING])
+
+  AC_SUBST(VERSION_MAJOR)
+  AC_SUBST(VERSION_MINOR)
+  AC_SUBST(VERSION_SECURITY)
+  AC_SUBST(VERSION_PATCH)
+  AC_SUBST(VERSION_PRE)
+  AC_SUBST(VERSION_BUILD)
+  AC_SUBST(VERSION_OPT)
+  AC_SUBST(VERSION_NUMBER)
+  AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS)
+  AC_SUBST(VERSION_STRING)
+  AC_SUBST(VERSION_SHORT)
+  AC_SUBST(VERSION_IS_GA)
+])
--- a/common/autoconf/spec.gmk.in	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/spec.gmk.in	Wed Jul 05 21:03:29 2017 +0200
@@ -130,13 +130,53 @@
 NASHORN_TOPDIR:=@NASHORN_TOPDIR@
 COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
 
-# Information gathered from the version.numbers file.
-JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
-JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
-JDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
-JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
-JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
-MILESTONE:=@MILESTONE@
+# New (JEP-223) version information
+
+## Building blocks of the version string
+# First three version numbers, with well-specified meanings (numerical)
+VERSION_MAJOR := @VERSION_MAJOR@
+VERSION_MINOR := @VERSION_MINOR@
+VERSION_SECURITY := @VERSION_SECURITY@
+# Optional fourth element for use by OpenJDK consumers (numerical)
+VERSION_PATCH := @VERSION_PATCH@
+# The pre-release identifier (string)
+VERSION_PRE := @VERSION_PRE@
+# The build number (numerical)
+VERSION_BUILD := @VERSION_BUILD@
+# Optional build information (string)
+VERSION_OPT := @VERSION_OPT@
+
+## Composite variables
+# The version number as a dot separated sequence of numbers, e.g. 9.0.1
+VERSION_NUMBER := @VERSION_NUMBER@
+# VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
+VERSION_NUMBER_FOUR_POSITIONS := @VERSION_NUMBER_FOUR_POSITIONS@
+# The complete version string, with additional build information
+VERSION_STRING := @VERSION_STRING@
+# The short version string, without trailing zeroes and just PRE, if present.
+VERSION_SHORT := @VERSION_SHORT@
+# The Java specification version. It should be equal to version number.
+VERSION_SPECIFICATION := @VERSION_NUMBER@
+# A GA version is defined by the PRE string being empty. Rather than testing for
+# that, this variable defines it with true/false.
+VERSION_IS_GA := @VERSION_IS_GA@
+
+# Convenience CFLAGS settings for passing version information into native programs.
+VERSION_CFLAGS := \
+    -DVERSION_MAJOR=$(VERSION_MAJOR) \
+    -DVERSION_MINOR=$(VERSION_MINOR) \
+    -DVERSION_SECURITY=$(VERSION_SECURITY) \
+    -DVERSION_PATCH=$(VERSION_PATCH) \
+    -DVERSION_PRE='"$(VERSION_PRE)"' \
+    -DVERSION_BUILD=$(VERSION_BUILD) \
+    -DVERSION_OPT='"$(VERSION_OPT)"' \
+    -DVERSION_NUMBER='"$(VERSION_NUMBER)"' \
+    -DVERSION_STRING='"$(VERSION_STRING)"' \
+    -DVERSION_SHORT='"$(VERSION_SHORT)"' \
+    -DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
+    #
+
+# Platform naming variables
 LAUNCHER_NAME:=@LAUNCHER_NAME@
 PRODUCT_NAME:=@PRODUCT_NAME@
 PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
@@ -144,27 +184,9 @@
 COMPANY_NAME:=@COMPANY_NAME@
 MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
 MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
-USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
 
-# Different version strings generated from the above information.
-JDK_VERSION:=@JDK_VERSION@
+# Different naming strings generated from the above information.
 RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
-COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
-# These variables need to be generated here so that MILESTONE and
-# JDK_BUILD_NUMBER can be overridden on the make command line.
-ifeq ($(MILESTONE), fcs)
-  RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
-else
-  RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
-endif
-
-ifneq ($(USER_RELEASE_SUFFIX), )
-  FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
-else
-  FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
-endif
-JRE_RELEASE_VERSION:=$(FULL_VERSION)
-JDK_VERSION_FOR_MANIFEST := $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(if $(JDK_UPDATE_VERSION),$(JDK_UPDATE_VERSION),0).$(COOKED_BUILD_NUMBER)
 
 # How to compile the code: release, fastdebug or slowdebug
 DEBUG_LEVEL:=@DEBUG_LEVEL@
@@ -641,8 +663,8 @@
 SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
 
 # Macosx bundles directory definitions
-JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
-JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
+JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents
+JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents
 JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
 JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
 
--- a/common/autoconf/version-numbers	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/autoconf/version-numbers	Wed Jul 05 21:03:29 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 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
@@ -23,10 +23,10 @@
 # questions.
 #
 
-JDK_MAJOR_VERSION=1
-JDK_MINOR_VERSION=9
-JDK_MICRO_VERSION=0
-JDK_UPDATE_VERSION=
+# Default version numbers to use unless overridden by configure
+
+DEFAULT_VERSION_MAJOR=9
+
 LAUNCHER_NAME=openjdk
 PRODUCT_NAME=OpenJDK
 PRODUCT_SUFFIX="Runtime Environment"
--- a/common/bin/test_builds.sh	Sun Nov 29 20:29:45 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-#!/bin/bash
-
-set -x
-set -e
-
-options="$*"
-option="$1"
-
-tmp=/tmp/test_builds.$$
-rm -f -r ${tmp}
-mkdir -p ${tmp}
-
-errMessages=${tmp}/error_messages.txt
-
-#######
-# Error function
-error() # message
-{
-   echo "ERROR: $1" | tee -a ${errMessages}
-}
-# Check errors
-checkErrors()
-{
-    if [ -s ${errMessages} ] ; then
-        cat ${errMessages}
-	exit 1
-    fi
-}
-#######
-
-os="`uname -s`"
-arch="`uname -p`"
-make=make
-
-if [ "${os}" = "SunOS" ] ; then
-  make=gmake
-  export J7="/opt/java/jdk1.7.0"
-elif [ "${os}" = "Darwin" ] ; then
-  export J7="/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home"
-elif [ "${os}" = "Linux" -a "${arch}" = "x86_64" ] ; then
-  export J7="/usr/lib/jvm/java-7-openjdk-amd64/"
-else
-  echo "What os/arch is this: ${os}/${arch}"
-  exit 1
-fi
-
-# Must have a jdk7
-if [ ! -d ${J7} ] ; then
-  echo "No JDK7 found at: ${J7}"
-  exit 1
-fi
-
-# What sources we use
-fromroot="http://hg.openjdk.java.net/build-infra/jdk8"
-
-# Where we do it
-root="testbuilds"
-mkdir -p ${root}
-
-# Three areas, last three are cloned from first to insure sameness
-t0=${root}/t0
-t1=${root}/t1
-t2=${root}/t2
-t3=${root}/t3
-repolist="${t0} ${t1} ${t2} ${t3}"
-
-# Optional complete clobber
-if [ "${option}" = "clobber" ] ; then
-  for i in ${repolist} ; do
-    rm -f -r ${i}
-  done
-fi
-
-# Get top repos
-if [ ! -d ${t0}/.hg ] ; then
-  rm -f -r ${t0}
-  hg clone ${fromroot} ${t0}
-fi
-for i in ${t1} ${t2} ${t3} ; do
-  if [ ! -d ${i}/.hg ] ; then
-    hg clone ${t0} ${i}
-  fi
-done
-
-# Get repos updated
-for i in ${repolist} ; do
-  ( \
-    set -e \
-    && cd ${i} \
-    && sh ./get_source.sh \
-    || error "Cannot get source" \
-  ) 2>&1 | tee ${i}.get_source.txt
-  checkErrors
-done
-
-# Optional clean
-if [ "${option}" = "clean" ] ; then
-  for i in ${repolist} ; do
-    rm -f -r ${i}/build
-    rm -f -r ${i}/*/build
-    rm -f -r ${i}/*/dist
-  done
-fi
-
-# Check changes on working set files
-for i in ${repolist} ; do
-  ( \
-    set -e \
-    && cd ${i} \
-    && sh ./make/scripts/hgforest.sh status \
-    || error "Cannot check status" \
-  ) 2>&1 | tee ${i}.hg.status.txt
-  checkErrors
-done
-
-# Configure for build-infra building
-for i in ${t1} ${t2} ; do
-  ( \
-    set -e \
-    && cd ${i}/common/makefiles \
-    && sh ../autoconf/configure --with-boot-jdk=${J7} \
-    || error "Cannot configure" \
-  ) 2>&1 | tee ${i}.config.txt
-  checkErrors
-done
-
-# Do build-infra builds
-for i in ${t1} ${t2} ; do
-  ( \
-    set -e \
-    && cd ${i}/common/makefiles \
-    && ${make}  \
-      FULL_VERSION:=1.8.0-internal-b00 \
-      JRE_RELEASE_VERSION:=1.8.0-internal-b00 \
-      USER_RELEASE_SUFFIX:=compare \
-      RELEASE:=1.8.0-internal \
-      VERBOSE= \
-      LIBARCH= \
-         all images \
-    || error "Cannot build" \
-  ) 2>&1 | tee ${i}.build.txt
-  checkErrors
-done
-
-# Compare build-infra builds
-( \
-  sh ${t0}/common/bin/compareimage.sh \
-    ${t1}/build/*/images/j2sdk-image \
-    ${t2}/build/*/images/j2sdk-image \
-    || error "Cannot compare" \
-) 2>&1 | tee ${root}/build-infra-comparison.txt
-checkErrors
-
-# Do old build
-unset JAVA_HOME
-export ALT_BOOTDIR="${J7}"
-( \
-  cd ${t3} \
-  && ${make} FULL_VERSION='"1.8.0-internal" sanity \
-  || error "Cannot sanity" \
-) 2>&1 | tee ${t3}.sanity.txt
-checkErrors
-( \
-  cd ${t3} \
-  && ${make} \
-      FULL_VERSION='"1.8.0-internal" \
-      JRE_RELEASE_VERSION:=1.8.0-internal-b00 \
-      USER_RELEASE_SUFFIX:=compare \
-      RELEASE:=1.8.0-internal \
-  || error "Cannot build old way" \
-) 2>&1 | tee ${t3}.build.txt
-checkErrors
-
-# Compare old build to build-infra build
-( \
-  sh ${t0}/common/bin/compareimage.sh \
-    ${t3}/build/*/j2sdk-image \
-    ${t1}/build/*/images/j2sdk-image \
-    || error "Cannot compare" \
-) 2>&1 | tee ${root}/build-comparison.txt
-checkErrors
-
-exit 0
--- a/common/nb_native/nbproject/configurations.xml	Sun Nov 29 20:29:45 2015 -0800
+++ b/common/nb_native/nbproject/configurations.xml	Wed Jul 05 21:03:29 2017 +0200
@@ -1911,15 +1911,9 @@
           <Elem>IDE_ALT_BOOTDIR</Elem>
         </envVariables>
         <transientMacros>
-          <Elem>FULL_VERSION="version"</Elem>
           <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
           <Elem>HOTSPOT_BUILD_USER="user"</Elem>
           <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
-          <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-          <Elem>JDK_MAJOR_VERSION="version"</Elem>
-          <Elem>JDK_MICRO_VERSION="version"</Elem>
-          <Elem>JDK_MINOR_VERSION="minor"</Elem>
-          <Elem>JRE_RELEASE_VERSION="version"</Elem>
         </transientMacros>
       </codeAssistance>
       <makefileType>
@@ -4534,7 +4528,6 @@
             flavor2="0">
         <ccTool>
           <preprocessorList>
-            <Elem>JRE_RELEASE_VERSION="version"</Elem>
           </preprocessorList>
         </ccTool>
       </item>
@@ -4857,15 +4850,12 @@
           <preprocessorList>
             <Elem>AMD64</Elem>
             <Elem>ARCH="amd64"</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>GAMMA</Elem>
             <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
             <Elem>HOTSPOT_BUILD_USER="user"</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
             <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
             <Elem>HOTSPOT_VM_DISTRO="OpenJDK"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_TYPE="gamma"</Elem>
             <Elem>LINK_INTO_LIBJVM</Elem>
             <Elem>PRODUCT</Elem>
@@ -5346,10 +5336,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -5399,10 +5385,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Finalizer.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -5429,10 +5411,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Array.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -5488,10 +5466,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Bits.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -5525,10 +5499,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="AccessController.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -5569,10 +5539,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -6141,10 +6107,6 @@
           <preprocessorList>
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LINUX</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -6198,10 +6160,6 @@
           <preprocessorList>
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LINUX</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -6577,10 +6535,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jdk_util_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -6623,10 +6577,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -6652,10 +6602,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ProcessEnvironment_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -6711,10 +6657,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="FileSystemPreferences.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -7037,10 +6979,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="HostLocaleProviderAdapter_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -7135,15 +7073,9 @@
           <Elem>IDE_ALT_BOOTDIR</Elem>
         </envVariables>
         <transientMacros>
-          <Elem>FULL_VERSION="version"</Elem>
           <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
           <Elem>HOTSPOT_BUILD_USER="user"</Elem>
           <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
-          <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-          <Elem>JDK_MAJOR_VERSION="version"</Elem>
-          <Elem>JDK_MICRO_VERSION="version"</Elem>
-          <Elem>JDK_MINOR_VERSION="minor"</Elem>
-          <Elem>JRE_RELEASE_VERSION="version"</Elem>
         </transientMacros>
       </codeAssistance>
       <makefileType>
@@ -9822,7 +9754,6 @@
             flavor2="0">
         <ccTool>
           <preprocessorList>
-            <Elem>JRE_RELEASE_VERSION="version"</Elem>
           </preprocessorList>
         </ccTool>
       </item>
@@ -10483,10 +10414,7 @@
           </incDir>
           <preprocessorList>
             <Elem>EXPAND_CLASSPATH_WILDCARDS</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>JAVA_ARGS={ "-J-ms8m", "com.sun.tools.javac.Main", }</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_NAME="openjdk"</Elem>
             <Elem>NEVER_ACT_AS_SERVER_CLASS_MACHINE</Elem>
             <Elem>PROGNAME="javac"</Elem>
@@ -11349,10 +11277,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="check_version.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11382,10 +11306,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jdk_util.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11415,10 +11335,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jio.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11448,10 +11364,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jni_util.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11481,10 +11393,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="verify_stub.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11569,10 +11477,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Class.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11602,10 +11506,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ClassLoader.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11635,10 +11535,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Compiler.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11668,10 +11564,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Double.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11701,10 +11593,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Float.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11734,10 +11622,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Object.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11767,10 +11651,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Package.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11800,10 +11680,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ResourceBundle.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11833,10 +11709,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Runtime.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11866,10 +11738,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="SecurityManager.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11899,10 +11767,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Shutdown.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11932,10 +11796,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="StrictMath.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11965,10 +11825,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="String.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -11998,10 +11854,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="System.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -12031,10 +11883,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Thread.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -12064,10 +11912,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Throwable.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -12804,10 +12648,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="TimeZone.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -20853,15 +20693,12 @@
           <preprocessorList>
             <Elem>AMD64</Elem>
             <Elem>ARCH="amd64"</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>GAMMA</Elem>
             <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
             <Elem>HOTSPOT_BUILD_USER="user"</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
             <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
             <Elem>HOTSPOT_VM_DISTRO="OpenJDK"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_TYPE="gamma"</Elem>
             <Elem>LINK_INTO_LIBJVM</Elem>
             <Elem>LINUX</Elem>
@@ -20919,15 +20756,12 @@
           <preprocessorList>
             <Elem>AMD64</Elem>
             <Elem>ARCH="amd64"</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>GAMMA</Elem>
             <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
             <Elem>HOTSPOT_BUILD_USER="user"</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
             <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
             <Elem>HOTSPOT_VM_DISTRO="OpenJDK"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_TYPE="gamma"</Elem>
             <Elem>LINK_INTO_LIBJVM</Elem>
             <Elem>LINUX</Elem>
@@ -21824,10 +21658,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -21877,10 +21707,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Finalizer.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -21907,10 +21733,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Array.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -21966,10 +21788,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Bits.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -22003,10 +21821,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="AccessController.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -22047,10 +21861,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -22619,10 +22429,6 @@
           <preprocessorList>
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LINUX</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -22676,10 +22482,6 @@
           <preprocessorList>
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LINUX</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -23055,10 +22857,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jdk_util_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -23101,10 +22899,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -23130,10 +22924,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ProcessEnvironment_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -23189,10 +22979,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="FileSystemPreferences.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -23515,10 +23301,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="HostLocaleProviderAdapter_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -23613,15 +23395,9 @@
           <Elem>IDE_ALT_BOOTDIR</Elem>
         </envVariables>
         <transientMacros>
-          <Elem>FULL_VERSION="version"</Elem>
           <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
           <Elem>HOTSPOT_BUILD_USER="user"</Elem>
           <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
-          <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-          <Elem>JDK_MAJOR_VERSION="version"</Elem>
-          <Elem>JDK_MICRO_VERSION="version"</Elem>
-          <Elem>JDK_MINOR_VERSION="minor"</Elem>
-          <Elem>JRE_RELEASE_VERSION="version"</Elem>
         </transientMacros>
       </codeAssistance>
       <makefileType>
@@ -27454,7 +27230,6 @@
             flavor2="0">
         <ccTool>
           <preprocessorList>
-            <Elem>JRE_RELEASE_VERSION="version"</Elem>
           </preprocessorList>
         </ccTool>
       </item>
@@ -28130,11 +27905,8 @@
           </incDir>
           <preprocessorList>
             <Elem>EXPAND_CLASSPATH_WILDCARDS</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>HAVE_GETHRTIME</Elem>
             <Elem>JAVA_ARGS={ "-J-ms8m", "com.sun.tools.javac.Main", }</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_NAME="openjdk"</Elem>
             <Elem>NEVER_ACT_AS_SERVER_CLASS_MACHINE</Elem>
             <Elem>PROGNAME="javac"</Elem>
@@ -28961,10 +28733,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="check_version.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -28994,10 +28762,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jdk_util.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29027,10 +28791,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jio.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29060,10 +28820,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="jni_util.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29093,10 +28849,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="verify_stub.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29181,10 +28933,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Class.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29214,10 +28962,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ClassLoader.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29247,10 +28991,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Compiler.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29280,10 +29020,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Double.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29313,10 +29049,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Float.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29346,10 +29078,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Object.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29379,10 +29107,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Package.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29412,10 +29136,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ResourceBundle.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29445,10 +29165,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Runtime.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29478,10 +29194,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="SecurityManager.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29511,10 +29223,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Shutdown.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29544,10 +29252,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="StrictMath.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29577,10 +29281,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="String.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29610,10 +29310,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="System.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29643,10 +29339,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Thread.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -29676,10 +29368,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Throwable.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -30416,10 +30104,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="TimeZone.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -38550,15 +38234,12 @@
           <preprocessorList>
             <Elem>AMD64</Elem>
             <Elem>ARCH="amd64"</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>GAMMA</Elem>
             <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
             <Elem>HOTSPOT_BUILD_USER="user"</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
             <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
             <Elem>HOTSPOT_VM_DISTRO="OpenJDK"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_TYPE="gamma"</Elem>
             <Elem>LINK_INTO_LIBJVM</Elem>
             <Elem>PRODUCT</Elem>
@@ -38723,15 +38404,12 @@
           <preprocessorList>
             <Elem>AMD64</Elem>
             <Elem>ARCH="amd64"</Elem>
-            <Elem>FULL_VERSION="version"</Elem>
             <Elem>GAMMA</Elem>
             <Elem>HOTSPOT_BUILD_TARGET="target"</Elem>
             <Elem>HOTSPOT_BUILD_USER="user"</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
             <Elem>HOTSPOT_RELEASE_VERSION="version"</Elem>
             <Elem>HOTSPOT_VM_DISTRO="OpenJDK"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>LAUNCHER_TYPE="gamma"</Elem>
             <Elem>LINK_INTO_LIBJVM</Elem>
             <Elem>PRODUCT</Elem>
@@ -39575,10 +39253,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -39628,10 +39302,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Finalizer.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -39658,10 +39328,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Array.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -39717,10 +39383,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="Bits.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -39754,10 +39416,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="AccessController.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -39798,10 +39456,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -40381,10 +40035,6 @@
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
             <Elem>BREAKPTS</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>MACRO_MEMSYS_OPS</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -40441,10 +40091,6 @@
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
             <Elem>BREAKPTS</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>MACRO_MEMSYS_OPS</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -40916,10 +40562,6 @@
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
             <Elem>BREAKPTS</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>MACRO_MEMSYS_OPS</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
@@ -40986,10 +40628,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
           </preprocessorList>
         </cTool>
       </folder>
@@ -41015,10 +40653,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="ProcessEnvironment_md.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -41074,10 +40708,6 @@
           </incDir>
           <preprocessorList>
             <Elem>ARCHPROPNAME="amd64"</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>THIS_FILE="FileSystemPreferences.c"</Elem>
           </preprocessorList>
         </cTool>
@@ -41528,10 +41158,6 @@
             <Elem>ARCH="amd64"</Elem>
             <Elem>ARCHPROPNAME="amd64"</Elem>
             <Elem>BREAKPTS</Elem>
-            <Elem>JDK_BUILD_NUMBER="nn"</Elem>
-            <Elem>JDK_MAJOR_VERSION="version"</Elem>
-            <Elem>JDK_MICRO_VERSION="version"</Elem>
-            <Elem>JDK_MINOR_VERSION="minor"</Elem>
             <Elem>MACRO_MEMSYS_OPS</Elem>
             <Elem>NDEBUG</Elem>
             <Elem>RELEASE=""</Elem>
--- a/hotspot/.hgtags	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/.hgtags	Wed Jul 05 21:03:29 2017 +0200
@@ -496,3 +496,4 @@
 3fd5c2ca4c20c183628b6dbeb8df821a961419e3 jdk9-b91
 53cb98d68a1aeb08d29c89d6da748de60c448e37 jdk9-b92
 d8b24776484cc4dfd19f50b23eaa18a80a161371 jdk9-b93
+a22b7c80529f5f05c847e932e017456e83c46233 jdk9-b94
--- a/hotspot/make/Makefile	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/Makefile	Wed Jul 05 21:03:29 2017 +0200
@@ -48,17 +48,14 @@
 #                             Set ALT_BUILD_WIN_SA=1 to enable building SA on
 #                             Windows.
 # Version strings and numbers:
-#  JDK_VERSION                Current JDK version (e.g. 1.6.0)
-#  PREVIOUS_JDK_VERSION       Previous (bootdir) JDK version (e.g. 1.5.0)
-#  FULL_VERSION               Full version string to use (e.g. "1.6.0-ea-b42")
-#
-# Version strings and numbers especially needed on Windows:
-#  COOKED_JDK_UPDATE_VERSION  Just the update release number (e.g. 02)
-#  COOKED_BUILD_NUMBER        Just the build number (e.g. 42)
-#  JDK_MKTG_VERSION           Marketing JDK version (e.g. 6.0)
-#  JDK_MAJOR_VERSION          Major number for version (e.g. 1) always 1?
-#  JDK_MINOR_VERSION          Minor number for version (e.g. 6)
-#  JDK_MICRO_VERSION          Micro number for version (e.g. 0)
+#  VERSION_SHORT      Current JDK version (e.g. 9.0.0)
+#  JDK_PREVIOUS_VERSION Previous (bootdir) JDK version (e.g. 1.5.0) (Only needed
+#  to facilitate standalone build.)
+#  VERSION_STRING     Full version string to use (e.g. "9.0.0-ea-b42")
+#  VERSION_MAJOR Major number for version (e.g. 9)
+#  VERSION_MINOR Minor number for version (e.g. 0)
+#  VERSION_SECURITY Security number for version (e.g. 0)
+#  VERSION_PATCH Patch number for version (e.g. 0)
 #
 
 # Default is build both product fastdebug and create export area
@@ -855,9 +852,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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/aix/Makefile	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/aix/makefiles/buildtree.make	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/aix/makefiles/defs.make	Wed Jul 05 21:03:29 2017 +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
+# 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
-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
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-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.
+  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
 
-  # 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 ($(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
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
+      $(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
+
+      $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+      ZIP_DEBUGINFO_FILES ?= 1
+
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
     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 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."))
-
-        # 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, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 # unused JDK_INCLUDE_SUBDIR=aix
 
--- a/hotspot/make/aix/makefiles/vm.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/aix/makefiles/vm.make	Wed Jul 05 21:03:29 2017 +0200
@@ -74,12 +74,14 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
+	        -DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/bsd/Makefile	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/bsd/Makefile	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/bsd/makefiles/buildtree.make	Wed Jul 05 21:03:29 2017 +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:
@@ -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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/bsd/makefiles/defs.make	Wed Jul 05 21:03:29 2017 +0200
@@ -144,117 +144,100 @@
 
 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
+# 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),)
+  # FULL_DEBUG_SYMBOLS not created for individual static libraries
+  ifeq ($(STATIC_BUILD),false)
+    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
   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
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-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.
+  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
+        # 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
 
-  # 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),)
-    # FULL_DEBUG_SYMBOLS not created for individual static libraries
-    ifeq ($(STATIC_BUILD),false)
-      ifeq ($(BUILD_FLAVOR), product)
-        FULL_DEBUG_SYMBOLS ?= 1
-        ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+      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
-        # debug variants always get Full Debug Symbols (if available)
-        ENABLE_FULL_DEBUG_SYMBOLS = 1
+        $(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
+
+        $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+        ZIP_DEBUGINFO_FILES ?= 1
       endif
-     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
-      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
-        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."))
-
-          # 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
-        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
 
@@ -274,7 +257,7 @@
 
 # jsig library not needed for static builds
 ifneq ($(STATIC_BUILD),true)
-# client and server subdirectories have symbolic links to ../libjsig.so
+  # client and server subdirectories have symbolic links to ../libjsig.so
   EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
 endif
 
--- a/hotspot/make/bsd/makefiles/vm.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/bsd/makefiles/vm.make	Wed Jul 05 21:03:29 2017 +0200
@@ -73,12 +73,14 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
+	        -DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/defs.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/defs.make	Wed Jul 05 21:03:29 2017 +0200
@@ -122,58 +122,49 @@
 # hotspot version definitions
 include $(GAMMADIR)/make/jdk_version
 
+# JDK_PREVIOUS_VERSION is only needed to facilitate standalone builds
+ifeq ($(JDK_PREVIOUS_VERSION),)
+  JDK_PREVIOUS_VERSION=$(STANDALONE_JDK_PREVIOUS_VERSION)
+endif
 # Java versions needed
-ifeq ($(PREVIOUS_JDK_VERSION),)
-  PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION)
+ifeq ($(VERSION_MAJOR),)
+  VERSION_MAJOR=$(STANDALONE_JDK_MAJOR_VER)
 endif
-ifeq ($(JDK_MAJOR_VERSION),)
-  JDK_MAJOR_VERSION=$(JDK_MAJOR_VER)
+ifeq ($(VERSION_MINOR),)
+  VERSION_MINOR=$(STANDALONE_JDK_MINOR_VER)
 endif
-ifeq ($(JDK_MINOR_VERSION),)
-  JDK_MINOR_VERSION=$(JDK_MINOR_VER)
+ifeq ($(VERSION_SECURITY),)
+  VERSION_SECURITY=$(STANDALONE_JDK_SECURITY_VER)
 endif
-ifeq ($(JDK_MICRO_VERSION),)
-  JDK_MICRO_VERSION=$(JDK_MICRO_VER)
+ifeq ($(VERSION_PATCH),)
+  VERSION_PATCH=$(STANDALONE_JDK_PATCH_VER)
 endif
-ifeq ($(JDK_BUILD_NUMBER),)
-  JDK_BUILD_NUMBER=0
+ifeq ($(VERSION_BUILD),)
+  VERSION_BUILD=0
 endif
-ifeq ($(JDK_MKTG_VERSION),)
-  JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
+ifeq ($(VERSION_SHORT),)
+  VERSION_SHORT=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_SECURITY)
 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
-endif
-ifeq ($(FULL_VERSION),)
-  FULL_VERSION="$(JDK_VERSION)"
+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)
+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
 
-ifndef HOTSPOT_RELEASE_VERSION
-  HOTSPOT_RELEASE_VERSION=$(FULL_VERSION)
-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	Sun Nov 29 20:29:45 2015 -0800
+++ /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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/jdk_version	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/linux/Makefile	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/linux/makefiles/buildtree.make	Wed Jul 05 21:03:29 2017 +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:
@@ -134,11 +133,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)
@@ -163,7 +158,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)
@@ -217,9 +212,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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/linux/makefiles/defs.make	Wed Jul 05 21:03:29 2017 +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
+# 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
-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
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-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.
+  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
 
-  # 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 ($(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
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
+      $(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
+
+      $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+      ZIP_DEBUGINFO_FILES ?= 1
+
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
     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 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."))
-
-        # 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, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 JDK_INCLUDE_SUBDIR=linux
 
--- a/hotspot/make/linux/makefiles/vm.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/linux/makefiles/vm.make	Wed Jul 05 21:03:29 2017 +0200
@@ -75,12 +75,14 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
+	        -DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/solaris/Makefile	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/solaris/Makefile	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/solaris/makefiles/buildtree.make	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/solaris/makefiles/defs.make	Wed Jul 05 21:03:29 2017 +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
+# 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
-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
+  $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
+  # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 
-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.
+  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
 
-  # 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)
+    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."; \
+          )
+        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
-      # debug variants always get Full Debug Symbols (if available)
-      ENABLE_FULL_DEBUG_SYMBOLS = 1
+      $(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
+
+      $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)"))
+
+      ZIP_DEBUGINFO_FILES ?= 1
+
+      $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
     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' \
-          )
-        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
-      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."))
-
-        # 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, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)"))
-      endif
-    endif # ENABLE_FULL_DEBUG_SYMBOLS=1
-  endif # BUILD_FLAVOR
-endif # JDK_6_OR_EARLIER
+  endif # ENABLE_FULL_DEBUG_SYMBOLS=1
+endif # BUILD_FLAVOR
 
 JDK_INCLUDE_SUBDIR=solaris
 
--- a/hotspot/make/solaris/makefiles/sparcWorks.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/solaris/makefiles/sparcWorks.make	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/solaris/makefiles/vm.make	Wed Jul 05 21:03:29 2017 +0200
@@ -69,12 +69,14 @@
 endif
 
 # The following variables are defined in the generated flags.make file.
-JDK_VER_DEFS  = -DJDK_MAJOR_VERSION="\"$(JDK_MAJOR_VERSION)\"" \
-		-DJDK_MINOR_VERSION="\"$(JDK_MINOR_VERSION)\"" \
-		-DJDK_MICRO_VERSION="\"$(JDK_MICRO_VERSION)\"" \
-		-DJDK_BUILD_NUMBER="\"$(JDK_BUILD_NUMBER)\""
-VM_VER_DEFS   = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\"" \
-		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
+JDK_VER_DEFS  = -DVERSION_MAJOR=$(VERSION_MAJOR) \
+		-DVERSION_MINOR=$(VERSION_MINOR) \
+		-DVERSION_SECURITY=$(VERSION_SECURITY) \
+	        -DVERSION_PATCH=$(VERSION_PATCH) \
+		-DVERSION_BUILD=$(VERSION_BUILD)
+VM_VER_DEFS   = -DHOTSPOT_VERSION_STRING="\"$(HOTSPOT_VERSION_STRING)\"" \
+		-DVERSION_STRING="\"$(VERSION_STRING)\""  \
+	        -DDEBUG_LEVEL="\"$(DEBUG_LEVEL)\"" \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
--- a/hotspot/make/windows/build.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/build.make	Wed Jul 05 21:03:29 2017 +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/debug.make	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/makefiles/debug.make	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/makefiles/defs.make	Wed Jul 05 21:03:29 2017 +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
@@ -179,24 +179,19 @@
 # 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 += VERSION_SHORT=$(VERSION_SHORT)
+MAKE_ARGS += VERSION_MAJOR=$(VERSION_MAJOR)
+MAKE_ARGS += VERSION_MINOR=$(VERSION_MINOR)
+MAKE_ARGS += VERSION_SECURITY=$(VERSION_SECURITY)
+MAKE_ARGS += VERSION_PATCH=$(VERSION_PATCH)
+MAKE_ARGS += VERSION_BUILD=$(VERSION_BUILD)
+MAKE_ARGS += DEBUG_LEVEL=$(DEBUG_LEVEL)
 
-# 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)
-
-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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/makefiles/fastdebug.make	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/makefiles/product.make	Wed Jul 05 21:03:29 2017 +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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/makefiles/vm.make	Wed Jul 05 21:03:29 2017 +0200
@@ -58,12 +58,14 @@
 !endif
 
 # The following variables are defined in the generated local.make file.
-CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_MICRO_VERSION=\"$(JDK_MICRO_VERSION)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JDK_BUILD_NUMBER=\"$(JDK_BUILD_NUMBER)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_VERSION_STRING=\"$(HOTSPOT_VERSION_STRING)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_MAJOR=$(VERSION_MAJOR)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_MINOR=$(VERSION_MINOR)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_SECURITY=$(VERSION_SECURITY)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_PATCH=$(VERSION_PATCH)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_BUILD=$(VERSION_BUILD)"
+CXX_FLAGS=$(CXX_FLAGS) /D "VERSION_STRING=\"$(VERSION_STRING)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "DEBUG_LEVEL=\"$(DEBUG_LEVEL)\""
 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)\""
@@ -414,4 +416,3 @@
 
 vm.def: $(Obj_Files)
 	sh $(WorkSpace)/make/windows/build_vm_def.sh $(BUILD_VM_DEF_FLAG)
-
--- a/hotspot/make/windows/projectfiles/common/Makefile	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/make/windows/projectfiles/common/Makefile	Wed Jul 05 21:03:29 2017 +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 DEBUG_LEVEL=$(DEBUG_LEVEL) -define VISUAL_STUDIO_BUILD=true
 ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
 
 $(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -155,7 +155,7 @@
   static char version_string[10] = "";
   if (version_string[0] == '\0') {
     jio_snprintf(version_string, sizeof(version_string), "%d.%d",
-                 Abstract_VM_Version::vm_minor_version(), Abstract_VM_Version::vm_micro_version());
+                 Abstract_VM_Version::vm_major_version(), Abstract_VM_Version::vm_minor_version());
   }
   return (const char*)version_string;
 }
--- a/hotspot/src/share/vm/memory/universe.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/memory/universe.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -354,37 +354,6 @@
   // Have already been initialized.
   _objectArrayKlassObj->append_to_sibling_list();
 
-  // Compute is_jdk version flags.
-  // Only 1.3 or later has the java.lang.Shutdown class.
-  // Only 1.4 or later has the java.lang.CharSequence interface.
-  // Only 1.5 or later has the java.lang.management.MemoryUsage class.
-  if (JDK_Version::is_partially_initialized()) {
-    uint8_t jdk_version;
-    Klass* k = SystemDictionary::resolve_or_null(
-        vmSymbols::java_lang_management_MemoryUsage(), THREAD);
-    CLEAR_PENDING_EXCEPTION; // ignore exceptions
-    if (k == NULL) {
-      k = SystemDictionary::resolve_or_null(
-          vmSymbols::java_lang_CharSequence(), THREAD);
-      CLEAR_PENDING_EXCEPTION; // ignore exceptions
-      if (k == NULL) {
-        k = SystemDictionary::resolve_or_null(
-            vmSymbols::java_lang_Shutdown(), THREAD);
-        CLEAR_PENDING_EXCEPTION; // ignore exceptions
-        if (k == NULL) {
-          jdk_version = 2;
-        } else {
-          jdk_version = 3;
-        }
-      } else {
-        jdk_version = 4;
-      }
-    } else {
-      jdk_version = 5;
-    }
-    JDK_Version::fully_initialize(jdk_version);
-  }
-
   #ifdef ASSERT
   if (FullGCALot) {
     // Allocate an array of dummy objects.
--- a/hotspot/src/share/vm/prims/jvm.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -3652,8 +3652,7 @@
   memset(info, 0, info_size);
 
   info->jvm_version = Abstract_VM_Version::jvm_version();
-  info->update_version = 0;          /* 0 in HotSpot Express VM */
-  info->special_update_version = 0;  /* 0 in HotSpot Express VM */
+  info->patch_version = Abstract_VM_Version::vm_patch_version();
 
   // when we add a new capability in the jvm_version_info struct, we should also
   // consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
--- a/hotspot/src/share/vm/prims/jvm.h	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/prims/jvm.h	Wed Jul 05 21:03:29 2017 +0200
@@ -1184,10 +1184,9 @@
  * ==========================================================================
  */
 typedef struct {
-    /* VM version string: follows the JDK release version naming convention    */
-    unsigned int jvm_version; /* <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]  */
-    unsigned int update_version : 8;
-    unsigned int special_update_version : 8;
+    unsigned int jvm_version; /* Encoded $VNUM as defined by JEP-223 */
+    unsigned int patch_version : 8; /* JEP-223 patch version */
+    unsigned int reserved3 : 8;
     unsigned int reserved1 : 16;
     unsigned int reserved2;
 
@@ -1206,18 +1205,16 @@
 
 #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JVM_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
+#define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 #define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
 
 JNIEXPORT void JNICALL
 JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
 
 typedef struct {
-    // Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx
-    unsigned int jdk_version;   /* Consists of major, minor, micro (n.n.n) */
-                                /* and build number (xx) */
-    unsigned int update_version : 8;         /* Update release version (uu) */
-    unsigned int special_update_version : 8; /* Special update release version (c)*/
+    unsigned int jdk_version; /* Encoded $VNUM as defined by JEP-223 */
+    unsigned int patch_version : 8; /* JEP-223 patch version */
+    unsigned int reserved3 : 8;
     unsigned int reserved1 : 16;
     unsigned int reserved2;
 
@@ -1238,11 +1235,7 @@
 
 #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JDK_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
-
-/* Build number is available only for RE build (i.e. JDK_BUILD_NUMBER is set to bNN)
- * It will be zero for internal builds.
- */
+#define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
 
 /*
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -197,6 +197,7 @@
   PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(),  false));
   PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(),  false));
   PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(),  true));
+  PropertyList_add(&_system_properties, new SystemProperty("jdk.debug", VM_Version::jdk_debug_level(),  false));
 
   // Following are JVMTI agent writable properties.
   // Properties values are set to NULL and they are
@@ -228,7 +229,7 @@
   const char* spec_vendor = "Oracle Corporation";
   uint32_t spec_version = JDK_Version::current().major_version();
 
-  jio_snprintf(buffer, bufsz, "1." UINT32_FORMAT, spec_version);
+  jio_snprintf(buffer, bufsz, UINT32_FORMAT, spec_version);
 
   PropertyList_add(&_system_properties,
       new SystemProperty("java.vm.specification.vendor",  spec_vendor, false));
--- a/hotspot/src/share/vm/runtime/java.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/java.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -651,47 +651,23 @@
   jdk_version_info_fn_t func = CAST_TO_FN_PTR(jdk_version_info_fn_t,
      os::dll_lookup(lib_handle, "JDK_GetVersionInfo0"));
 
-  if (func == NULL) {
-    // JDK older than 1.6
-    _current._partially_initialized = true;
-  } else {
-    (*func)(&info, sizeof(info));
+  assert(func != NULL, "Support for JDK 1.5 or older has been removed after JEP-223");
 
-    int major = JDK_VERSION_MAJOR(info.jdk_version);
-    int minor = JDK_VERSION_MINOR(info.jdk_version);
-    int micro = JDK_VERSION_MICRO(info.jdk_version);
-    int build = JDK_VERSION_BUILD(info.jdk_version);
-    if (major == 1 && minor > 4) {
-      // We represent "1.5.0" as "5.0", but 1.4.2 as itself.
-      major = minor;
-      minor = micro;
-      micro = 0;
-    }
-    // Incompatible with pre-4243978 JDK.
-    if (info.pending_list_uses_discovered_field == 0) {
-      vm_exit_during_initialization(
-        "Incompatible JDK is not using Reference.discovered field for pending list");
-    }
-    _current = JDK_Version(major, minor, micro, info.update_version,
-                           info.special_update_version, build,
-                           info.thread_park_blocker == 1,
-                           info.post_vm_init_hook_enabled == 1);
+  (*func)(&info, sizeof(info));
+
+  int major = JDK_VERSION_MAJOR(info.jdk_version);
+  int minor = JDK_VERSION_MINOR(info.jdk_version);
+  int security = JDK_VERSION_SECURITY(info.jdk_version);
+  int build = JDK_VERSION_BUILD(info.jdk_version);
+
+  // Incompatible with pre-4243978 JDK.
+  if (info.pending_list_uses_discovered_field == 0) {
+    vm_exit_during_initialization(
+      "Incompatible JDK is not using Reference.discovered field for pending list");
   }
-}
-
-void JDK_Version::fully_initialize(
-    uint8_t major, uint8_t minor, uint8_t micro, uint8_t update) {
-  // This is only called when current is less than 1.6 and we've gotten
-  // far enough in the initialization to determine the exact version.
-  assert(major < 6, "not needed for JDK version >= 6");
-  assert(is_partially_initialized(), "must not initialize");
-  if (major < 5) {
-    // JDK verison sequence: 1.2.x, 1.3.x, 1.4.x, 5.0.x, 6.0.x, etc.
-    micro = minor;
-    minor = major;
-    major = 1;
-  }
-  _current = JDK_Version(major, minor, micro, update);
+  _current = JDK_Version(major, minor, security, info.patch_version, build,
+                         info.thread_park_blocker == 1,
+                         info.post_vm_init_hook_enabled == 1);
 }
 
 void JDK_Version_init() {
@@ -700,29 +676,18 @@
 
 static int64_t encode_jdk_version(const JDK_Version& v) {
   return
-    ((int64_t)v.major_version()          << (BitsPerByte * 5)) |
-    ((int64_t)v.minor_version()          << (BitsPerByte * 4)) |
-    ((int64_t)v.micro_version()          << (BitsPerByte * 3)) |
-    ((int64_t)v.update_version()         << (BitsPerByte * 2)) |
-    ((int64_t)v.special_update_version() << (BitsPerByte * 1)) |
+    ((int64_t)v.major_version()          << (BitsPerByte * 4)) |
+    ((int64_t)v.minor_version()          << (BitsPerByte * 3)) |
+    ((int64_t)v.security_version()       << (BitsPerByte * 2)) |
+    ((int64_t)v.patch_version()          << (BitsPerByte * 1)) |
     ((int64_t)v.build_number()           << (BitsPerByte * 0));
 }
 
 int JDK_Version::compare(const JDK_Version& other) const {
   assert(is_valid() && other.is_valid(), "Invalid version (uninitialized?)");
-  if (!is_partially_initialized() && other.is_partially_initialized()) {
-    return -(other.compare(*this)); // flip the comparators
-  }
-  assert(!other.is_partially_initialized(), "Not initialized yet");
-  if (is_partially_initialized()) {
-    assert(other.major_version() >= 6,
-           "Invalid JDK version comparison during initialization");
-    return -1;
-  } else {
-    uint64_t e = encode_jdk_version(*this);
-    uint64_t o = encode_jdk_version(other);
-    return (e > o) ? 1 : ((e == o) ? 0 : -1);
-  }
+  uint64_t e = encode_jdk_version(*this);
+  uint64_t o = encode_jdk_version(other);
+  return (e > o) ? 1 : ((e == o) ? 0 : -1);
 }
 
 void JDK_Version::to_string(char* buffer, size_t buflen) const {
@@ -731,28 +696,21 @@
 
   if (!is_valid()) {
     jio_snprintf(buffer, buflen, "%s", "(uninitialized)");
-  } else if (is_partially_initialized()) {
-    jio_snprintf(buffer, buflen, "%s", "(uninitialized) pre-1.6.0");
   } else {
     int rc = jio_snprintf(
         &buffer[index], buflen - index, "%d.%d", _major, _minor);
     if (rc == -1) return;
     index += rc;
-    if (_micro > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _micro);
+    if (_security > 0) {
+      rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _security);
     }
-    if (_update > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, "_%02d", _update);
-      if (rc == -1) return;
-      index += rc;
-    }
-    if (_special > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, "%c", _special);
+    if (_patch > 0) {
+      rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _patch);
       if (rc == -1) return;
       index += rc;
     }
     if (_build > 0) {
-      rc = jio_snprintf(&buffer[index], buflen - index, "-b%02d", _build);
+      rc = jio_snprintf(&buffer[index], buflen - index, "+%d", _build);
       if (rc == -1) return;
       index += rc;
     }
--- a/hotspot/src/share/vm/runtime/java.hpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/java.hpp	Wed Jul 05 21:03:29 2017 +0200
@@ -51,18 +51,9 @@
 extern void vm_shutdown_during_initialization(const char* error, const char* message = NULL);
 
 /**
- * Discovering the JDK_Version during initialization is tricky when the
- * running JDK is less than JDK6.  For JDK6 and greater, a "GetVersion"
- * function exists in libjava.so and we simply call it during the
- * 'initialize()' call to find the version.  For JDKs with version < 6, no
- * such call exists and we have to probe the JDK in order to determine
- * the exact version.  This probing cannot happen during late in
- * the VM initialization process so there's a period of time during
- * initialization when we don't know anything about the JDK version other than
- * that it less than version 6.  This is the "partially initialized" time,
- * when we can answer only certain version queries (such as, is the JDK
- * version greater than 5?  Answer: no).  Once the JDK probing occurs, we
- * know the version and are considered fully initialized.
+ * With the integration of the changes to handle the version string
+ * as defined by JEP-223, most of the code related to handle the version
+ * string prior to JDK 1.6 was removed (partial initialization)
  */
 class JDK_Version VALUE_OBJ_CLASS_SPEC {
   friend class VMStructs;
@@ -74,53 +65,32 @@
   static const char* _runtime_name;
   static const char* _runtime_version;
 
-  // In this class, we promote the minor version of release to be the
-  // major version for releases >= 5 in anticipation of the JDK doing the
-  // same thing.  For example, we represent "1.5.0" as major version 5 (we
-  // drop the leading 1 and use 5 as the 'major').
-
   uint8_t _major;
   uint8_t _minor;
-  uint8_t _micro;
-  uint8_t _update;
-  uint8_t _special;
+  uint8_t _security;
+  uint8_t _patch;
   uint8_t _build;
 
-  // If partially initialized, the above fields are invalid and we know
-  // that we're less than major version 6.
-  bool _partially_initialized;
-
   bool _thread_park_blocker;
   bool _post_vm_init_hook_enabled;
 
   bool is_valid() const {
-    return (_major != 0 || _partially_initialized);
+    return (_major != 0);
   }
 
   // initializes or partially initializes the _current static field
   static void initialize();
 
-  // Completes initialization for a pre-JDK6 version.
-  static void fully_initialize(uint8_t major, uint8_t minor = 0,
-                               uint8_t micro = 0, uint8_t update = 0);
-
  public:
 
-  // Returns true if the the current version has only been partially initialized
-  static bool is_partially_initialized() {
-    return _current._partially_initialized;
-  }
-
-  JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
-                  _special(0), _build(0), _partially_initialized(false),
+  JDK_Version() : _major(0), _minor(0), _security(0), _patch(0), _build(0),
                   _thread_park_blocker(false), _post_vm_init_hook_enabled(false)
                   {}
 
-  JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
-              uint8_t update = 0, uint8_t special = 0, uint8_t build = 0,
+  JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t security = 0,
+              uint8_t patch = 0, uint8_t build = 0,
               bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) :
-      _major(major), _minor(minor), _micro(micro), _update(update),
-      _special(special), _build(build), _partially_initialized(false),
+      _major(major), _minor(minor), _security(security), _patch(patch), _build(build),
       _thread_park_blocker(thread_park_blocker),
       _post_vm_init_hook_enabled(post_vm_init_hook_enabled)
       {}
@@ -133,23 +103,18 @@
     return JDK_Version(m);
   }
 
-  static JDK_Version jdk_update(uint8_t major, uint8_t update_number) {
-    return JDK_Version(major, 0, 0, update_number);
-  }
-
   static JDK_Version undefined() {
     return JDK_Version(0);
   }
 
   bool is_undefined() const {
-    return (_major == 0);
+    return _major == 0;
   }
 
   uint8_t major_version() const          { return _major; }
   uint8_t minor_version() const          { return _minor; }
-  uint8_t micro_version() const          { return _micro; }
-  uint8_t update_version() const         { return _update; }
-  uint8_t special_update_version() const { return _special; }
+  uint8_t security_version() const       { return _security; }
+  uint8_t patch_version() const          { return _patch; }
   uint8_t build_number() const           { return _build; }
 
   bool supports_thread_park_blocker() const {
@@ -159,7 +124,7 @@
     return _post_vm_init_hook_enabled;
   }
 
-  // Performs a full ordering comparison using all fields (update, build, etc.)
+  // Performs a full ordering comparison using all fields (patch, build, etc.)
   int compare(const JDK_Version& other) const;
 
   /**
@@ -168,16 +133,7 @@
    * equal, and a positive value if it is greater.
    */
   int compare_major(int version) const {
-    if (_partially_initialized) {
-      if (version >= 6) {
-        return -1;
-      } else {
-        assert(false, "Can't make this comparison during init time");
-        return -1; // conservative
-      }
-    } else {
       return major_version() - version;
-    }
   }
 
   void to_string(char* buffer, size_t buflen) const;
--- a/hotspot/src/share/vm/runtime/statSampler.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/statSampler.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -223,6 +223,7 @@
   "java.vm.name",
   "java.vm.vendor",
   "java.vm.info",
+  "jdk.debug",
   "java.library.path",
   "java.class.path",
   "java.version",
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -1313,12 +1313,11 @@
      static_field(Abstract_VM_Version,         _s_internal_vm_info_string,                    const char*)                           \
      static_field(Abstract_VM_Version,         _vm_major_version,                             int)                                   \
      static_field(Abstract_VM_Version,         _vm_minor_version,                             int)                                   \
-     static_field(Abstract_VM_Version,         _vm_micro_version,                             int)                                   \
+     static_field(Abstract_VM_Version,         _vm_security_version,                          int)                                   \
      static_field(Abstract_VM_Version,         _vm_build_number,                              int)                                   \
      static_field(Abstract_VM_Version,         _reserve_for_allocation_prefetch,              int)                                   \
                                                                                                                                      \
      static_field(JDK_Version,                 _current,                                      JDK_Version)                           \
-  nonstatic_field(JDK_Version,                 _partially_initialized,                        bool)                                  \
   nonstatic_field(JDK_Version,                 _major,                                        unsigned char)                         \
                                                                                                                                      \
   /*************************/                                                                                                        \
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -40,79 +40,55 @@
 unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
 int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
 
-#ifndef HOTSPOT_RELEASE_VERSION
-  #error HOTSPOT_RELEASE_VERSION must be defined
+#ifndef HOTSPOT_VERSION_STRING
+  #error HOTSPOT_VERSION_STRING must be defined
 #endif
 
-#ifndef JDK_MAJOR_VERSION
-  #error JDK_MAJOR_VERSION must be defined
+#ifndef VERSION_MAJOR
+  #error VERSION_MAJOR must be defined
 #endif
-#ifndef JDK_MINOR_VERSION
-  #error JDK_MINOR_VERSION must be defined
+#ifndef VERSION_MINOR
+  #error VERSION_MINOR must be defined
 #endif
-#ifndef JDK_MICRO_VERSION
-  #error JDK_MICRO_VERSION must be defined
+#ifndef VERSION_SECURITY
+  #error VERSION_SECURITY must be defined
 #endif
-#ifndef JDK_BUILD_NUMBER
-  #error JDK_BUILD_NUMBER must be defined
+#ifndef VERSION_PATCH
+  #error VERSION_PATCH must be defined
+#endif
+#ifndef VERSION_BUILD
+  #error VERSION_BUILD must be defined
 #endif
 
-#ifndef JRE_RELEASE_VERSION
-  #error JRE_RELEASE_VERSION must be defined
+#ifndef VERSION_STRING
+  #error VERSION_STRING must be defined
+#endif
+
+#ifndef DEBUG_LEVEL
+  #error DEBUG_LEVEL 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;
-bool Abstract_VM_Version::_initialized = false;
+// HOTSPOT_VERSION_STRING equals the JDK VERSION_STRING (unless overridden
+// in a standalone build).
+int Abstract_VM_Version::_vm_major_version = VERSION_MAJOR;
+int Abstract_VM_Version::_vm_minor_version = VERSION_MINOR;
+int Abstract_VM_Version::_vm_security_version = VERSION_SECURITY;
+int Abstract_VM_Version::_vm_patch_version = VERSION_PATCH;
+int Abstract_VM_Version::_vm_build_number = VERSION_BUILD;
 unsigned int Abstract_VM_Version::_parallel_worker_threads = 0;
 bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
 
-#ifdef ASSERT
-static void assert_digits(const char * s, const char * message) {
-  for (int i = 0; s[i] != '\0'; i++) {
-    assert(isdigit(s[i]), "%s", 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() {
-  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;
-}
-
 #if defined(_LP64)
   #define VMLP "64-Bit "
 #else
@@ -154,6 +130,7 @@
 #endif
 }
 
+
 const char* Abstract_VM_Version::vm_info_string() {
   if (CodeCacheExtensions::use_pregenerated_interpreter()) {
     return "interpreted mode, pregenerated";
@@ -181,7 +158,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")             \
@@ -262,7 +239,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,10 +247,14 @@
   return HOTSPOT_BUILD_USER;
 }
 
+const char *Abstract_VM_Version::jdk_debug_level() {
+  return DEBUG_LEVEL;
+}
+
 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	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Wed Jul 05 21:03:29 2017 +0200
@@ -45,9 +45,9 @@
   static unsigned int _L1_data_cache_line_size;
   static int          _vm_major_version;
   static int          _vm_minor_version;
-  static int          _vm_micro_version;
+  static int          _vm_security_version;
+  static int          _vm_patch_version;
   static int          _vm_build_number;
-  static bool         _initialized;
   static unsigned int _parallel_worker_threads;
   static bool         _parallel_worker_threads_initialized;
   static int          _reserve_for_allocation_prefetch;
@@ -75,10 +75,11 @@
   static const char* vm_platform_string();
   static const char* vm_build_user();
 
-  static int vm_major_version()               { assert(_initialized, "not initialized"); return _vm_major_version; }
-  static int vm_minor_version()               { assert(_initialized, "not initialized"); return _vm_minor_version; }
-  static int vm_micro_version()               { assert(_initialized, "not initialized"); return _vm_micro_version; }
-  static int vm_build_number()                { assert(_initialized, "not initialized"); return _vm_build_number; }
+  static int vm_major_version()               { return _vm_major_version; }
+  static int vm_minor_version()               { return _vm_minor_version; }
+  static int vm_security_version()            { return _vm_security_version; }
+  static int vm_patch_version()               { return _vm_patch_version; }
+  static int vm_build_number()                { return _vm_build_number; }
 
   // Gets the jvm_version_info.jvm_version defined in jvm.h
   static unsigned int jvm_version();
@@ -86,6 +87,7 @@
   // Internal version providing additional build information
   static const char* internal_vm_info_string();
   static const char* jre_release_version();
+  static const char* jdk_debug_level();
 
   // does HW support an 8-byte compare-exchange operation?
   static bool supports_cx8()  {
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -179,12 +179,13 @@
   output()->print_cr("%s version %s", Abstract_VM_Version::vm_name(),
           Abstract_VM_Version::vm_release());
   JDK_Version jdk_version = JDK_Version::current();
-  if (jdk_version.update_version() > 0) {
-    output()->print_cr("JDK %d.%d_%02d", jdk_version.major_version(),
-            jdk_version.minor_version(), jdk_version.update_version());
+  if (jdk_version.patch_version() > 0) {
+    output()->print_cr("JDK %d.%d.%d.%d", jdk_version.major_version(),
+            jdk_version.minor_version(), jdk_version.security_version(),
+            jdk_version.patch_version());
   } else {
-    output()->print_cr("JDK %d.%d", jdk_version.major_version(),
-            jdk_version.minor_version());
+    output()->print_cr("JDK %d.%d.%d", jdk_version.major_version(),
+            jdk_version.minor_version(), jdk_version.security_version());
   }
 }
 
--- a/hotspot/src/share/vm/services/management.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/services/management.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -84,10 +84,6 @@
   ClassLoadingService::init();
 #else
   ThreadService::init();
-  // Make sure the VM version is initialized
-  // This is normally called by RuntimeService::init().
-  // Since that is conditionalized out, we need to call it here.
-  Abstract_VM_Version::initialize();
 #endif // INCLUDE_MANAGEMENT
 }
 
--- a/hotspot/src/share/vm/services/runtimeService.cpp	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/src/share/vm/services/runtimeService.cpp	Wed Jul 05 21:03:29 2017 +0200
@@ -42,8 +42,6 @@
 double RuntimeService::_last_safepoint_sync_time_sec = 0.0;
 
 void RuntimeService::init() {
-  // Make sure the VM version is initialized
-  Abstract_VM_Version::initialize();
 
   if (UsePerfData) {
     EXCEPTION_MARK;
--- a/hotspot/test/runtime/6981737/Test6981737.java	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/test/runtime/6981737/Test6981737.java	Wed Jul 05 21:03:29 2017 +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";
--- a/hotspot/test/testlibrary/jdk/test/lib/Platform.java	Sun Nov 29 20:29:45 2015 -0800
+++ b/hotspot/test/testlibrary/jdk/test/lib/Platform.java	Wed Jul 05 21:03:29 2017 +0200
@@ -29,7 +29,7 @@
     private static final String osName      = System.getProperty("os.name");
     private static final String dataModel   = System.getProperty("sun.arch.data.model");
     private static final String vmVersion   = System.getProperty("java.vm.version");
-    private static final String javaVersion = System.getProperty("java.version");
+    private static final String jdkDebug    = System.getProperty("jdk.debug");
     private static final String osArch      = System.getProperty("os.arch");
     private static final String vmName      = System.getProperty("java.vm.name");
     private static final String userName    = System.getProperty("user.name");
@@ -100,8 +100,7 @@
     }
 
     public static boolean isDebugBuild() {
-        return (vmVersion.toLowerCase().contains("debug") ||
-                javaVersion.toLowerCase().contains("debug"));
+        return (jdkDebug.toLowerCase().contains("debug"));
     }
 
     public static String getVMVersion() {
--- a/make/Images.gmk	Sun Nov 29 20:29:45 2015 -0800
+++ b/make/Images.gmk	Wed Jul 05 21:03:29 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -363,13 +363,14 @@
 
 # Param 1 - The file containing the MODULES list
 define create-info-file
-  $(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
+  $(call info-file-item, "JAVA_VERSION", "$(VERSION_NUMBER)")
+  $(call info-file-item, "JAVA_FULL_VERSION", "$(VERSION_STRING)")
   $(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
   $(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
   $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
   $(if $(JDK_ARCH_ABI_PROP_NAME), \
     $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
-  $(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
+  $(call info-file-item, "SOURCE", "$(strip $(ALL_SOURCE_TIPS))")
   $(call info-file-item, "MODULES", "`$(CAT) $1`")
 endef
 
--- a/make/Install.gmk	Sun Nov 29 20:29:45 2015 -0800
+++ b/make/Install.gmk	Wed Jul 05 21:03:29 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -28,7 +28,7 @@
 include $(SPEC)
 
 BINARIES := $(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
-INSTALLDIR := openjdk-$(RELEASE)
+INSTALLDIR := openjdk-$(VERSION_SHORT)
 
 # Install the jdk image, in a very crude way. Not taking into
 # account, how to install properly on macosx or windows etc.
--- a/make/Javadoc.gmk	Sun Nov 29 20:29:45 2015 -0800
+++ b/make/Javadoc.gmk	Wed Jul 05 21:03:29 2017 +0200
@@ -49,8 +49,6 @@
 
 HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
 
-BUILD_NUMBER=$(JDK_BUILD_NUMBER)
-
 JAVADOC_CMD = $(JAVA) \
     -Djava.awt.headless=true \
     $(NEW_JAVADOC)
@@ -122,11 +120,8 @@
 BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
 
 # Url to devdocs page
-# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
-DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
-DEV_DOCS_URL-8 = http://download.oracle.com/javase/8/docs/index.html
-DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
-DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
+DOCS_BASE_URL = http://docs.oracle.com/javase/$(VERSION_SPECIFICATION)/docs
+DEV_DOCS_URL = $(DOCS_BASE_URL)/index.html
 
 # Common Java trademark line
 JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
@@ -313,14 +308,13 @@
 
 
 
-# Draft used for non-fcs documents
-DRAFT_HEADER =
-ifneq ($(MILESTONE), fcs)
-  DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
-  DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
-  DRAFT_WINTITLE = $(BUILD_NUMBER)
+# Assume we need a draft format when the version string is not a GA version.
+ifeq ($(VERSION_IS_GA), false)
+  DRAFT_HEADER := <br><strong>DRAFT&nbsp;$(VERSION_STRING)</strong>
+  DRAFT_BOTTOM := <br><strong>DRAFT&nbsp;$(VERSION_STRING)</strong>
+  DRAFT_WINTITLE := $(VERSION_BUILD)
   # Early access top text (not used in FCS releases)
-  COREAPI_TOP_EARLYACCESS = \
+  COREAPI_TOP_EARLYACCESS := \
 <div style="background-color: \#EEEEEE"> \
 <div style="padding: 6px; margin-top: 2px; margin-bottom: 6px; \
 margin-left: 6px; margin-right: 6px; text-align: justify; \
@@ -331,7 +325,11 @@
 The information is being made available to you solely for purpose of \
 evaluation. \
 </div> </div>
-
+else
+  DRAFT_HEADER :=
+  DRAFT_BOTTOM :=
+  DRAFT_WINTITLE :=
+  COREAPI_TOP_EARLYACCESS :=
 endif
 
 #################################################################
@@ -351,39 +349,15 @@
 all: docs
 docs: coredocs otherdocs
 
-#################################################################
-# Production Targets -- USE THESE TARGETS WHEN:
-# a) You're generating docs outside of release engineering's
-#    standard control build.
-# b) The docs will be pushed to the web and/or included in
-#    the downloaded doc bundle.
-#
-# See: Notes.html#releaseTargets
-# Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)
-#
-
-sanitycheckcoredocs:
-	@$(ECHO) ""
-	@$(ECHO) "Building core api docs with these values:"
-	@$(ECHO) "    BUILD_NUMBER = $(BUILD_NUMBER)"
-	@$(ECHO) "    MILESTONE = $(MILESTONE)"
-	@$(ECHO) ""
-        ifeq ($(BUILD_NUMBER), b00)
-	  @$(ECHO) "ERROR: Build number must be defined"
-	  @$(ECHO) "MILESTONE is set to $(MILESTONE)"
-	  @$(ECHO) ""
-	  exit 1
-        endif
-
 #############################################################
 #
 # coredocs
 #
 COREAPI_DOCTITLE = Java$(TRADEMARK) Platform, Standard Edition \
-$(JDK_MINOR_VERSION)<br>API Specification
-COREAPI_WINDOWTITLE = Java Platform SE $(JDK_MINOR_VERSION)
+$(VERSION_SPECIFICATION)<br>API Specification
+COREAPI_WINDOWTITLE = Java Platform SE $(VERSION_SPECIFICATION)
 COREAPI_HEADER = \
-<strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
+<strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(VERSION_SPECIFICATION)</strong>
 
 # Overview file for core apis
 COREAPI_OVERVIEW = $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html
@@ -1338,55 +1312,9 @@
 	$(prep-target)
 	$(call PackageFilter,$(JDKNET_PKGS))
 
-#############################################################
-#release version of core packages ########
-
-# The rel-coredocs and rel-docs targets were added by Eric Armstrong. rel-coredocs
-# assumes the kind of large, 32-bit machine used in the javapubs group's docs-release
-# process. It specifies memory settings accordingly to maximize performance.
-#
-# The performance settings, like the sanity check, are most important for the core
-# docs--the platform APIs. Running javadoc on those APIs takes a significant amount
-# of time and memory. Setting the initial heap size as large as possible is important
-# to prevent thrashing as the heap grows. Setting the maximum as large as necessary
-# is also important to keep the job from failing.
-#
-#    -J-Xmx512 sets a maximum of 512, which became necessary in 6.0
-#    -J-Xms256 sets starting size to 256 (default is 8)
-#
-# rel-coredocs also includes a sanity check to help ensure that BUILD_NUMBER and
-# MILESTONE are specified properly when docs are built outside of the normal release
-# engineering process, with the intention of releasing them on the web or in a downloaded
-# docs bundle. (When invoked in release engineering's control build, the values are always
-# set properly. But when the targets are run by themselves, they default to b00 and
-# "internal"--which silently sabotage the result of a build that can take many hours
-# to complete.
-
-# Maximize performance and ensure that build number & milestone are set.
-
-rel-coredocs: sanitycheckcoredocs
-	$(MAKE) coredocs
-
-rel-docs: rel-coredocs $(ALL_OTHER_TARGETS)
-#
-# end of production targets
 
 otherdocs: $(ALL_OTHER_TARGETS)
 
-clean:
-	$(RM) -r $(DOCSDIR) $(DOCSTMPDIR)
-
 #############################################################
-# DEBUG TARGET
-# List the values defined in the makefile hierarchy, to make sure everything
-# is set properly, and to help identify values we can use instead of making new ones.
-# (Most of them come from common/shared/Defs.gmk)
-#
-# Notes:
-# * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
-# * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
-#
-
-#############################################################
-.PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
-    sanitycheckcoredocs $(ALL_OTHER_TARGETS)
+.PHONY: all docs coredocs otherdocs \
+     $(ALL_OTHER_TARGETS)
--- a/make/JrtfsJar.gmk	Sun Nov 29 20:29:45 2015 -0800
+++ b/make/JrtfsJar.gmk	Wed Jul 05 21:03:29 2017 +0200
@@ -35,7 +35,8 @@
   SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
   OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \
   REPLACEMENTS := \
-      @@RELEASE@@ => $(RELEASE) ; \
+      @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \
+      @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
       @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
 ))
 
--- a/make/MacBundles.gmk	Sun Nov 29 20:29:45 2015 -0800
+++ b/make/MacBundles.gmk	Wed Jul 05 21:03:29 2017 +0200
@@ -38,11 +38,11 @@
 
   MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
 
-    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
-  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
-    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
-  BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
-  BUNDLE_VERSION := $(JDK_VERSION)
+  BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
+  BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
+  BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
+  BUNDLE_PLATFORM_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR)
+  BUNDLE_VERSION := $(VERSION_NUMBER)
   ifeq ($(COMPANY_NAME), N/A)
     BUNDLE_VENDOR := UNDEFINED
   else
--- a/make/jprt.properties	Sun Nov 29 20:29:45 2015 -0800
+++ b/make/jprt.properties	Wed Jul 05 21:03:29 2017 +0200
@@ -90,10 +90,11 @@
 # Configure args common to all builds
 # Also allows for additional, testset specific configure arguments to be set
 jprt.build.configure.args=						\
-    --with-output-sync=recurse 						\
-    --with-boot-jdk=$ALT_BOOTDIR 					\
-    --with-jobs=$ALT_PARALLEL_COMPILE_JOBS 				\
-    MAKE=$JPRT_MAKE							\
+    --with-output-sync=recurse						\
+    --with-boot-jdk=$ALT_BOOTDIR					\
+    --with-jobs=$ALT_PARALLEL_COMPILE_JOBS				\
+    --with-version-opt=$JPRT_JOB_ID				 	\
+    MAKE=$JPRT_MAKE                                                     \
     ${my.additional.build.configure.args.${jprt.test.set}}		\
     ${my.custom.build.configure.args}