changeset 1504:8b0cc5d855fb

Merge
author ccheung
date Sat, 02 May 2015 18:35:36 -0700
parents f463d506379a (current diff) 495c4a8641b0 (diff)
children 30e6c0063b5e 6179ef0cb94e
files make/Images.gmk make/jprt.properties modules.xml
diffstat 24 files changed, 3084 insertions(+), 942 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri May 01 09:45:44 2015 -0400
+++ b/.hgtags	Sat May 02 18:35:36 2015 -0700
@@ -298,3 +298,10 @@
 d6ed47125a76cd1cf8a100568507bfb5e9669d9f jdk9-b53
 cb7367141e910e265b8344a8facee740bd1e5467 jdk9-b54
 0c37a832458f0e0b7d2a3f1a6f69aeae311aeb18 jdk9-b55
+eb7febe45865ba6b81f2ea68082262d0708a0b22 jdk9-b56
+f25ee9f62427a9ba27418e5531a89754791a305b jdk9-b57
+6e78dd9b121037719a065fe8fb25b936babdfecb jdk9-b58
+39e8a131289e8386aa4c3e4b184faa812a7c0421 jdk9-b59
+9fa2185bee17462d1014538bff60af6e6f0b01e7 jdk9-b60
+ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61
+105d045a69174d870b69bfe471b3f2d05a9f8ecc jdk9-b62
--- a/README-builds.html	Fri May 01 09:45:44 2015 -0400
+++ b/README-builds.html	Sat May 02 18:35:36 2015 -0700
@@ -41,7 +41,8 @@
                         The build is now a "<code>configure &amp;&amp; make</code>" style build
                     </li>
                     <li>
-                        Any GNU make 3.81 or newer should work
+                        Any GNU make 3.81 or newer should work, except on
+                        Windows where 4.0 or newer is recommended.
                     </li>
                     <li>
                         The build should scale, i.e. more processors should
@@ -358,8 +359,8 @@
                 For all systems:
                 <ul>
                     <li>
-                        Be sure the GNU make utility is version 3.81 or newer,
-                        e.g. run "<code>make -version</code>"
+                        Be sure the GNU make utility is version 3.81 (4.0 on
+                        windows) or newer, e.g. run "<code>make -version</code>"
                     </li>
                     <li>
                         Install a
@@ -441,7 +442,7 @@
                                     </li>
                                     <li>
                                         Install
-                                        <a href="#vs2010">Visual Studio 2010</a>
+                                        <a href="#vs2013">Visual Studio 2013</a>
                                     </li>
                                 </ul>
                             </td>
@@ -750,23 +751,23 @@
 
                     </blockquote>
 
-                    <h5><a name="vs2010">Visual Studio 2010 Compilers</a></h5>
+                    <h5><a name="vs2013">Visual Studio 2013 Compilers</a></h5>
                     <blockquote>
                         <p>
                             The 32-bit and 64-bit OpenJDK Windows build requires
-                            Microsoft Visual Studio C++ 2010 (VS2010) Professional
+                            Microsoft Visual Studio C++ 2013 (VS2013) Professional
                             Edition or Express compiler.
                             The compiler and other tools are expected to reside
                             in the location defined by the variable
-                            <code>VS100COMNTOOLS</code> which
+                            <code>VS120COMNTOOLS</code> which
                             is set by the Microsoft Visual Studio installer.
                         </p>
                         <p>
-                            Only the C++ part of VS2010 is needed.
+                            Only the C++ part of VS2013 is needed.
                             Try to let the installation go to the default 
                             install directory.
-                            Always reboot your system after installing VS2010.
-                            The system environment variable VS100COMNTOOLS 
+                            Always reboot your system after installing VS2013.
+                            The system environment variable VS120COMNTOOLS 
                             should be
                             set in your environment.
                         </p>
@@ -1040,7 +1041,7 @@
                                     <br>
                                     This is usually picked up automatically
                                     from the redist
-                                    directories of Visual Studio 2010.
+                                    directories of Visual Studio 2013.
                                 </td>
                             </tr>                            
                             <tr>
@@ -1726,10 +1727,10 @@
             A few notes about using GNU make:
             <ul>
                 <li>
-                    You need GNU make version 3.81 or newer.
-                    If the GNU make utility on your systems is not
-                    3.81 or newer,
-                    see <a href="#buildgmake">"Building GNU make"</a>.
+                    You need GNU make version 3.81 or newer. On Windows 4.0 or
+                    newer is recommended.
+                    If the GNU make utility on your systems is not of a suitable
+                    version see <a href="#buildgmake">"Building GNU make"</a>.
                 </li>
                 <li>
                     Place the location of the GNU make binary in the
@@ -1854,54 +1855,54 @@
                     <tbody>
                         <tr>
                             <td>Linux X86 (32-bit) and X64 (64-bit)</td>
-                            <td>Fedora 9</td>
-                            <td>gcc 4.3 </td>
-                            <td>JDK 7u7</td>
+                            <td>Oracle Enterprise Linux 6.4</td>
+                            <td>gcc 4.8.2 </td>
+                            <td>JDK 8</td>
                             <td>2 or more</td>
                             <td>1 GB</td>
                             <td>6 GB</td>
                         </tr>
                         <tr>
-                            <td>Solaris SPARC (32-bit) and SPARCV9 (64-bit)</td>
-                            <td>Solaris 10 Update 6</td>
-                            <td>Studio 12 Update 1 + patches</td>
-                            <td>JDK 7u7</td>
+                            <td>Solaris SPARCV9 (64-bit)</td>
+                            <td>Solaris 10 Update 10</td>
+                            <td>Studio 12 Update 3 + patches</td>
+                            <td>JDK 8</td>
                             <td>4 or more</td>
                             <td>4 GB</td>
                             <td>8 GB</td>
                         </tr>
                         <tr>
-                            <td>Solaris X86 (32-bit) and X64 (64-bit)</td>
-                            <td>Solaris 10 Update 6</td>
-                            <td>Studio 12 Update 1 + patches</td>
-                            <td>JDK 7u7</td>
+                            <td>Solaris X64 (64-bit)</td>
+                            <td>Solaris 10 Update 10</td>
+                            <td>Studio 12 Update 3 + patches</td>
+                            <td>JDK 8</td>
                             <td>4 or more</td>
                             <td>4 GB</td>
                             <td>8 GB</td>
                         </tr>
                         <tr>
                             <td>Windows X86 (32-bit)</td>
-                            <td>Windows XP</td>
-                            <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
-                            <td>JDK 7u7</td>
+                            <td>Windows Server 2012 R2 x64</td>
+                            <td>Microsoft Visual Studio C++ 2013 Professional Edition</td>
+                            <td>JDK 8</td>
                             <td>2 or more</td>
                             <td>2 GB</td>
                             <td>6 GB</td>
                         </tr>
                         <tr>
                             <td>Windows X64 (64-bit)</td>
-                            <td>Windows Server 2003 - Enterprise x64 Edition</td>
-                            <td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
-                            <td>JDK 7u7</td>
+                            <td>Windows Server 2012 R2 x64</td>
+                            <td>Microsoft Visual Studio C++ 2013 Professional Edition</td>
+                            <td>JDK 8</td>
                             <td>2 or more</td>
                             <td>2 GB</td>
                             <td>6 GB</td>
                         </tr>
                         <tr>
                             <td>Mac OS X X64 (64-bit)</td>
-                            <td>Mac OS X 10.7 "Lion"</td>
-                            <td>XCode 4.5.2 or newer</td>
-                            <td>JDK 7u7</td>
+                            <td>Mac OS X 10.9 "Mavericks"</td>
+                            <td>XCode 5.1.1 or newer</td>
+                            <td>JDK 8</td>
                             <td>2 or more</td>
                             <td>4 GB</td>
                             <td>6 GB</td>
@@ -2009,7 +2010,7 @@
                 </blockquote>
 
                 <h4><a name="ubuntu">Ubuntu 12.04</a></h4>
-                <blockquote>                       
+                <blockquote>
                     After installing <a href="http://ubuntu.org">Ubuntu</a> 12.04 
                     you need to install several build dependencies. The simplest
                     way to do it is to execute the following commands:
--- a/common/autoconf/basics.m4	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/basics.m4	Sat May 02 18:35:36 2015 -0700
@@ -478,6 +478,15 @@
   AUTOCONF_DIR=$TOPDIR/common/autoconf
 ])
 
+# Evaluates platform specific overrides for devkit variables.
+# $1: Name of variable
+AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
+[
+  if test "x[$]$1" = x; then
+    eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
+  fi
+])
+
 AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
 [
   AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
@@ -487,12 +496,27 @@
         DEVKIT_ROOT="$with_devkit"
         # Check for a meta data info file in the root of the devkit
         if test -f "$DEVKIT_ROOT/devkit.info"; then
+          . $DEVKIT_ROOT/devkit.info
           # This potentially sets the following:
-          # DEVKIT_NAME: A descriptive name of the devkit
-          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
-          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
-          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
-          . $DEVKIT_ROOT/devkit.info
+          # A descriptive name of the devkit
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
+          # Corresponds to --with-extra-path
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
+          # Corresponds to --with-toolchain-path
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
+          # Corresponds to --with-sysroot
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
+
+          # Identifies the Visual Studio version in the devkit
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
+          # The Visual Studio include environment variable
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
+          # The Visual Studio lib environment variable
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
+          # Corresponds to --with-msvcr-dll
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
+          # Corresponds to --with-msvcp-dll
+          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
         fi
 
         AC_MSG_CHECKING([for devkit])
@@ -502,9 +526,7 @@
           AC_MSG_RESULT([$DEVKIT_ROOT])
         fi
 
-        if test "x$DEVKIT_EXTRA_PATH" != x; then
-          BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
-        fi
+        BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
 
         # Fallback default of just /bin if DEVKIT_PATH is not defined
         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
@@ -681,8 +703,12 @@
       files_present=`$LS $OUTPUT_ROOT`
       # Configure has already touched config.log and confdefs.h in the current dir when this check
       # is performed.
-      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
-      | $TR -d '\n'`
+      filtered_files=`$ECHO "$files_present" \
+          | $SED -e 's/config.log//g' \
+	      -e 's/confdefs.h//g' \
+	      -e 's/fixpath.exe//g' \
+	      -e 's/ //g' \
+          | $TR -d '\n'`
       if test "x$filtered_files" != x; then
         AC_MSG_NOTICE([Current directory is $CURDIR.])
         AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
@@ -700,9 +726,13 @@
 
   BASIC_FIXUP_PATH(OUTPUT_ROOT)
 
+  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
+  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
+
   AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
   AC_SUBST(CONF_NAME, $CONF_NAME)
   AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
+  AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
 
   # The spec.gmk file contains all variables for the make system.
   AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
@@ -727,6 +757,16 @@
 [
   MAKE_CANDIDATE="$1"
   DESCRIPTION="$2"
+
+  # On Cygwin, we require a newer version of make than on other platforms
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    MAKE_VERSION_EXPR="-e 4\."
+    MAKE_REQUIRED_VERSION="4.0"
+   else
+    MAKE_VERSION_EXPR="-e 3\.8[[12]] -e 4\."
+    MAKE_REQUIRED_VERSION="3.81"
+  fi
+
   if test "x$MAKE_CANDIDATE" != x; then
     AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
@@ -734,9 +774,9 @@
     if test "x$IS_GNU_MAKE" = x; then
       AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
     else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[[12]]' -e '4\.'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
       if test "x$IS_MODERN_MAKE" = x; then
-        AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
+        AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
       else
         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -800,7 +840,7 @@
     fi
     BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
     if test "x$FOUND_MAKE" = x; then
-      AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.])
+      AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
     fi
   else
     # Try our hardest to locate a correct version of GNU make
@@ -828,13 +868,13 @@
     fi
 
     if test "x$FOUND_MAKE" = x; then
-      AC_MSG_ERROR([Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
+      AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
     fi
   fi
 
   MAKE=$FOUND_MAKE
   AC_SUBST(MAKE)
-  AC_MSG_NOTICE([Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
+  AC_MSG_NOTICE([Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
 
   BASIC_CHECK_MAKE_OUTPUT_SYNC
 ])
--- a/common/autoconf/basics_windows.m4	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/basics_windows.m4	Sat May 02 18:35:36 2015 -0700
@@ -66,7 +66,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -383,45 +383,46 @@
   if test "x$OPENJDK_BUILD_OS" = xwindows; then
     AC_MSG_CHECKING([if fixpath can be created])
     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
-    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
+    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
+    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
-      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
-      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
-      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
+      FIXPATH="$FIXPATH_BIN -c"
     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
-      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
-      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
-
       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
       # @ was chosen as separator to minimize risk of other tools messing around with it
-      all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
+      all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
+          | tr ' ' '\n' | grep '^/./' | sort | uniq`
       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
-
-      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
+      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
     fi
-    rm -f $OUTPUT_ROOT/fixpath*
-    cd $OUTPUT_ROOT
-    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
+    FIXPATH_SRC_W="$FIXPATH_SRC"
+    FIXPATH_BIN_W="$FIXPATH_BIN"
+    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
+    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
+    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
+    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
+    cd $FIXPATH_DIR
+    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
     cd $CURDIR
 
-    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
+    if test ! -x $FIXPATH_BIN; then
       AC_MSG_RESULT([no])
-      cat $OUTPUT_ROOT/fixpath1.log
-      AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
+      cat $FIXPATH_DIR/fixpath1.log
+      AC_MSG_ERROR([Could not create $FIXPATH_BIN])
     fi
     AC_MSG_RESULT([yes])
     AC_MSG_CHECKING([if fixpath.exe works])
-    cd $OUTPUT_ROOT
-    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
+    cd $FIXPATH_DIR
+    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
+        > $FIXPATH_DIR/fixpath2.log 2>&1
     cd $CURDIR
-    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
+    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
       AC_MSG_RESULT([no])
-      cat $OUTPUT_ROOT/fixpath2.log
+      cat $FIXPATH_DIR/fixpath2.log
       AC_MSG_ERROR([fixpath did not work!])
     fi
     AC_MSG_RESULT([yes])
-    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
   fi
 
   AC_SUBST(FIXPATH)
--- a/common/autoconf/build-performance.m4	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/build-performance.m4	Sat May 02 18:35:36 2015 -0700
@@ -336,11 +336,4 @@
   AC_MSG_CHECKING([whether to use sjavac])
   AC_MSG_RESULT([$ENABLE_SJAVAC])
   AC_SUBST(ENABLE_SJAVAC)
-
-  if test "x$ENABLE_SJAVAC" = xyes; then
-    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
-  else
-    SJAVAC_SERVER_DIR=
-  fi
-  AC_SUBST(SJAVAC_SERVER_DIR)
 ])
--- a/common/autoconf/configure.ac	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/configure.ac	Sat May 02 18:35:36 2015 -0700
@@ -261,7 +261,7 @@
 
 # We're messing a bit with internal autoconf variables to put the config.status
 # in the output directory instead of the current directory.
-CONFIG_STATUS="$OUTPUT_ROOT/config.status"
+CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
 
 # Create the actual output files. Now the main work of configure is done.
 AC_OUTPUT
@@ -269,7 +269,7 @@
 
 # Try to move the config.log file to the output directory.
 if test -e ./config.log; then
-  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
+  $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
 fi
 
 # Make the compare script executable
--- a/common/autoconf/generated-configure.sh	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/generated-configure.sh	Sat May 02 18:35:36 2015 -0700
@@ -632,7 +632,6 @@
 CFLAGS_CCACHE
 CCACHE
 USE_PRECOMPILED_HEADER
-SJAVAC_SERVER_DIR
 ENABLE_SJAVAC
 SJAVAC_SERVER_JAVA_FLAGS
 SJAVAC_SERVER_JAVA
@@ -746,8 +745,6 @@
 JTREGEXE
 USING_BROKEN_SUSE_LD
 PACKAGE_PATH
-LDEXECXX
-LDEXE
 USE_CLANG
 HOTSPOT_LD
 HOTSPOT_CXX
@@ -884,6 +881,7 @@
 CHECK_MAKE
 CHECK_GMAKE
 PKGHANDLER
+CONFIGURESUPPORT_OUTPUTDIR
 OUTPUT_ROOT
 CONF_NAME
 SPEC
@@ -3466,6 +3464,10 @@
 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
 
 
+# Evaluates platform specific overrides for devkit variables.
+# $1: Name of variable
+
+
 
 
 
@@ -4290,8 +4292,8 @@
 #
 
 ################################################################################
-
-VALID_VS_VERSIONS="2010 2012 2013"
+# The order of these defines the priority by which we try to find them.
+VALID_VS_VERSIONS="2013 2012 2010"
 
 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
 VS_VERSION_INTERNAL_2010=100
@@ -4365,7 +4367,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1427843803
+DATE_WHEN_GENERATED=1430331133
 
 ###############################################################################
 #
@@ -14184,7 +14186,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -14310,7 +14312,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -14880,7 +14882,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -14967,12 +14969,63 @@
         DEVKIT_ROOT="$with_devkit"
         # Check for a meta data info file in the root of the devkit
         if test -f "$DEVKIT_ROOT/devkit.info"; then
+          . $DEVKIT_ROOT/devkit.info
           # This potentially sets the following:
-          # DEVKIT_NAME: A descriptive name of the devkit
-          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
-          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
-          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
-          . $DEVKIT_ROOT/devkit.info
+          # A descriptive name of the devkit
+
+  if test "x$DEVKIT_NAME" = x; then
+    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # Corresponds to --with-extra-path
+
+  if test "x$DEVKIT_EXTRA_PATH" = x; then
+    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # Corresponds to --with-toolchain-path
+
+  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
+    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # Corresponds to --with-sysroot
+
+  if test "x$DEVKIT_SYSROOT" = x; then
+    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
+  fi
+
+
+          # Identifies the Visual Studio version in the devkit
+
+  if test "x$DEVKIT_VS_VERSION" = x; then
+    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # The Visual Studio include environment variable
+
+  if test "x$DEVKIT_VS_INCLUDE" = x; then
+    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # The Visual Studio lib environment variable
+
+  if test "x$DEVKIT_VS_LIB" = x; then
+    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # Corresponds to --with-msvcr-dll
+
+  if test "x$DEVKIT_MSVCR_DLL" = x; then
+    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
+  fi
+
+          # Corresponds to --with-msvcp-dll
+
+  if test "x$DEVKIT_MSVCP_DLL" = x; then
+    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
+  fi
+
         fi
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
@@ -14985,7 +15038,6 @@
 $as_echo "$DEVKIT_ROOT" >&6; }
         fi
 
-        if test "x$DEVKIT_EXTRA_PATH" != x; then
 
   if test "x$DEVKIT_EXTRA_PATH" != x; then
     if test "x$EXTRA_PATH" = x; then
@@ -14995,7 +15047,6 @@
     fi
   fi
 
-        fi
 
         # Fallback default of just /bin if DEVKIT_PATH is not defined
         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
@@ -15290,8 +15341,12 @@
       files_present=`$LS $OUTPUT_ROOT`
       # Configure has already touched config.log and confdefs.h in the current dir when this check
       # is performed.
-      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
-      | $TR -d '\n'`
+      filtered_files=`$ECHO "$files_present" \
+          | $SED -e 's/config.log//g' \
+	      -e 's/confdefs.h//g' \
+	      -e 's/fixpath.exe//g' \
+	      -e 's/ //g' \
+          | $TR -d '\n'`
       if test "x$filtered_files" != x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
@@ -15358,7 +15413,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -15443,6 +15498,9 @@
   fi
 
 
+  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
+  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
+
   SPEC=$OUTPUT_ROOT/spec.gmk
 
   CONF_NAME=$CONF_NAME
@@ -15450,6 +15508,7 @@
   OUTPUT_ROOT=$OUTPUT_ROOT
 
 
+
   # The spec.gmk file contains all variables for the make system.
   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
 
@@ -15527,6 +15586,16 @@
 
   MAKE_CANDIDATE=""$MAKE""
   DESCRIPTION="user supplied MAKE=$MAKE"
+
+  # On Cygwin, we require a newer version of make than on other platforms
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    MAKE_VERSION_EXPR="-e 4\."
+    MAKE_REQUIRED_VERSION="4.0"
+   else
+    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
+    MAKE_REQUIRED_VERSION="3.81"
+  fi
+
   if test "x$MAKE_CANDIDATE" != x; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
@@ -15536,10 +15605,10 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
     else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
       if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
       else
         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -15659,7 +15728,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -15852,7 +15921,7 @@
   fi
 
     if test "x$FOUND_MAKE" = x; then
-      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
+      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
     fi
   else
     # Try our hardest to locate a correct version of GNU make
@@ -15904,6 +15973,16 @@
 
   MAKE_CANDIDATE=""$CHECK_GMAKE""
   DESCRIPTION="gmake in PATH"
+
+  # On Cygwin, we require a newer version of make than on other platforms
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    MAKE_VERSION_EXPR="-e 4\."
+    MAKE_REQUIRED_VERSION="4.0"
+   else
+    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
+    MAKE_REQUIRED_VERSION="3.81"
+  fi
+
   if test "x$MAKE_CANDIDATE" != x; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
@@ -15913,10 +15992,10 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
     else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
       if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
       else
         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -16036,7 +16115,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -16278,6 +16357,16 @@
 
   MAKE_CANDIDATE=""$CHECK_MAKE""
   DESCRIPTION="make in PATH"
+
+  # On Cygwin, we require a newer version of make than on other platforms
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    MAKE_VERSION_EXPR="-e 4\."
+    MAKE_REQUIRED_VERSION="4.0"
+   else
+    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
+    MAKE_REQUIRED_VERSION="3.81"
+  fi
+
   if test "x$MAKE_CANDIDATE" != x; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
@@ -16287,10 +16376,10 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
     else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
       if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
       else
         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -16410,7 +16499,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -16657,6 +16746,16 @@
 
   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
   DESCRIPTION="gmake in tools-dir"
+
+  # On Cygwin, we require a newer version of make than on other platforms
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    MAKE_VERSION_EXPR="-e 4\."
+    MAKE_REQUIRED_VERSION="4.0"
+   else
+    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
+    MAKE_REQUIRED_VERSION="3.81"
+  fi
+
   if test "x$MAKE_CANDIDATE" != x; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
@@ -16666,10 +16765,10 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
     else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
       if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
       else
         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -16789,7 +16888,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -17030,6 +17129,16 @@
 
   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
   DESCRIPTION="make in tools-dir"
+
+  # On Cygwin, we require a newer version of make than on other platforms
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    MAKE_VERSION_EXPR="-e 4\."
+    MAKE_REQUIRED_VERSION="4.0"
+   else
+    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
+    MAKE_REQUIRED_VERSION="3.81"
+  fi
+
   if test "x$MAKE_CANDIDATE" != x; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
@@ -17039,10 +17148,10 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
     else
-      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
+      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
       if test "x$IS_MODERN_MAKE" = x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
-$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
+$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
       else
         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -17162,7 +17271,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -17360,14 +17469,14 @@
     fi
 
     if test "x$FOUND_MAKE" = x; then
-      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
+      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
     fi
   fi
 
   MAKE=$FOUND_MAKE
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
-$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
+$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
 
 
   # Check if make supports the output sync option and if so, setup using it.
@@ -20227,7 +20336,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -20556,7 +20665,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -20747,7 +20856,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -20931,7 +21040,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -21114,7 +21223,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -21297,7 +21406,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -21471,7 +21580,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -21620,7 +21729,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -21790,7 +21899,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -22115,7 +22224,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -22327,7 +22436,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -22504,7 +22613,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -22709,7 +22818,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -22886,7 +22995,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -23091,7 +23200,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -23268,7 +23377,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -23473,7 +23582,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -23650,7 +23759,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -23842,7 +23951,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -24017,7 +24126,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -24210,7 +24319,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -24385,7 +24494,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -24577,7 +24686,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -24752,7 +24861,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -24945,7 +25054,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -25120,7 +25229,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -25294,7 +25403,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -26674,11 +26783,15 @@
   ORG_CFLAGS="$CFLAGS"
   ORG_CXXFLAGS="$CXXFLAGS"
 
+  # autoconf magic only relies on PATH, so update it if tools dir is specified
+  OLD_PATH="$PATH"
+
   # On Windows, we need to detect the visual studio installation first.
   # This will change the PATH, but we need to keep that new PATH even
   # after toolchain detection is done, since the compiler (on x86) uses
   # it for DLL resolution in runtime.
-  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
+  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
+      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
 
   # Store path to cygwin link.exe to help excluding it when searching for
   # VS linker. This must be done before changing the PATH when looking for VS.
@@ -26756,6 +26869,56 @@
     done
 
     exit 0
+  elif test "x$DEVKIT_VS_VERSION" != x; then
+    VS_VERSION=$DEVKIT_VS_VERSION
+    TOOLCHAIN_VERSION=$VS_VERSION
+    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
+    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
+    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
+    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+    VS_PATH="$TOOLCHAIN_PATH:$PATH"
+
+    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
+    # can still be exported as INCLUDE for compiler invocations without
+    # SYSROOT_CFLAGS
+    OLDIFS="$IFS"
+    IFS=";"
+    for i in $DEVKIT_VS_INCLUDE; do
+      ipath=$i
+
+  unix_path="$ipath"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    windows_path=`$CYGPATH -m "$unix_path"`
+    ipath="$windows_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    windows_path=`cmd //c echo $unix_path`
+    ipath="$windows_path"
+  fi
+
+      VS_INCLUDE="$VS_INCLUDE;$ipath"
+    done
+    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
+    # as LIB for compiler invocations without SYSROOT_LDFLAGS
+    for i in $DEVKIT_VS_LIB; do
+      libpath=$i
+
+  unix_path="$libpath"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    windows_path=`$CYGPATH -m "$unix_path"`
+    libpath="$windows_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    windows_path=`cmd //c echo $unix_path`
+    libpath="$windows_path"
+  fi
+
+      VS_LIB="$VS_LIB;$libpath"
+    done
+    IFS="$OLDIFS"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
+$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
+
   elif test "x$with_toolchain_version" != x; then
     # User override; check that it is valid
     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
@@ -27328,8 +27491,10 @@
   done
 
 
-  if test "x$VS_ENV_CMD" != x; then
-    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
+  # If we have a devkit, skip all of the below.
+  if test "x$DEVKIT_VS_VERSION" = x; then
+    if test "x$VS_ENV_CMD" != x; then
+      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
 
   # Only process if variable expands to non-empty
 
@@ -27429,7 +27594,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -27617,17 +27782,17 @@
   fi
 
 
-    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
+      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
 
-    # We need to create a couple of temporary files.
-    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
-    $MKDIR -p $VS_ENV_TMP_DIR
-
-    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
-    # Instead create a shell script which will set the relevant variables when run.
-    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
+      # We need to create a couple of temporary files.
+      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
+      $MKDIR -p $VS_ENV_TMP_DIR
+
+      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
+      # Instead create a shell script which will set the relevant variables when run.
+      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
 
   unix_path="$WINPATH_VS_ENV_CMD"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -27638,7 +27803,7 @@
     WINPATH_VS_ENV_CMD="$windows_path"
   fi
 
-    WINPATH_BASH="$BASH"
+      WINPATH_BASH="$BASH"
 
   unix_path="$WINPATH_BASH"
   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -27650,59 +27815,67 @@
   fi
 
 
-    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
-    # script (executable by bash) that will setup the important variables.
-    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
-    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
-    # This will end up something like:
-    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
-    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
-    # These will end up something like:
-    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
-    # The trailing space for everyone except PATH is no typo, but is needed due
-    # to trailing \ in the Windows paths. These will be stripped later.
-    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-
-    # Now execute the newly created bat file.
-    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
-    # Change directory so we don't need to mess with Windows paths in redirects.
-    cd $VS_ENV_TMP_DIR
-    cmd /c extract-vs-env.bat | $CAT
-    cd $CURDIR
-
-    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
+      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
+      # script (executable by bash) that will setup the important variables.
+      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
+      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
+      # This will end up something like:
+      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
+      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
+      # These will end up something like:
+      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
+      # The trailing space for everyone except PATH is no typo, but is needed due
+      # to trailing \ in the Windows paths. These will be stripped later.
+      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+
+      # Now execute the newly created bat file.
+      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
+      # Change directory so we don't need to mess with Windows paths in redirects.
+      cd $VS_ENV_TMP_DIR
+      cmd /c extract-vs-env.bat | $CAT
+      cd $CURDIR
+
+      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
-      as_fn_error $? "Cannot continue" "$LINENO" 5
-    fi
-
-    # Now set all paths and other env variables. This will allow the rest of
-    # the configure script to find and run the compiler in the proper way.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+      fi
+
+      # Now set all paths and other env variables. This will allow the rest of
+      # the configure script to find and run the compiler in the proper way.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
 $as_echo "$as_me: Setting extracted environment variables" >&6;}
-    . $VS_ENV_TMP_DIR/set-vs-env.sh
-    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
-    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
-  else
-    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
+      . $VS_ENV_TMP_DIR/set-vs-env.sh
+      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
+      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
+    else
+      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
+    fi
   fi
 
   # At this point, we should have correct variables in the environment, or we can't continue.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
 $as_echo_n "checking for Visual Studio variables... " >&6; }
 
-  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
+  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
+      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
 $as_echo "present but broken" >&6; }
@@ -27787,7 +27960,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -27937,7 +28110,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -28056,9 +28229,6 @@
     export LIB="$VS_LIB"
   fi
 
-  # autoconf magic only relies on PATH, so update it if tools dir is specified
-  OLD_PATH="$PATH"
-
   # For solaris we really need solaris tools, and not the GNU equivalent.
   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
   # so add that to path before starting to probe.
@@ -28397,7 +28567,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -28858,7 +29028,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -30145,7 +30315,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -30606,7 +30776,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -31472,7 +31642,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -31891,7 +32061,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -32239,7 +32409,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -32738,7 +32908,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -33370,7 +33540,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -33845,7 +34015,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -34188,7 +34358,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -34529,7 +34699,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -34852,7 +35022,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -35371,7 +35541,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -35843,7 +36013,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -36315,7 +36485,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -36788,7 +36958,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -37372,7 +37542,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -37954,7 +38124,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -38545,7 +38715,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -39133,7 +39303,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -39629,7 +39799,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -40101,7 +40271,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -40573,7 +40743,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -40834,13 +41004,6 @@
   fi
 
 
-  # LDEXE is the linker to use, when creating executables. Not really used.
-  # FIXME: These should just be removed!
-  LDEXE="$LD"
-  LDEXECXX="$LDCXX"
-
-
-
 
 
 
@@ -41131,7 +41294,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -43136,50 +43299,69 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
 $as_echo_n "checking if fixpath can be created... " >&6; }
     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
-    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
+    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
+    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
-      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
-      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
-      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
+      FIXPATH="$FIXPATH_BIN -c"
     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
-      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
-      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
-
       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
       # @ was chosen as separator to minimize risk of other tools messing around with it
-      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
+      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
+          | tr ' ' '\n' | grep '^/./' | sort | uniq`
       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
-
-      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
-    fi
-    rm -f $OUTPUT_ROOT/fixpath*
-    cd $OUTPUT_ROOT
-    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
+      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
+    fi
+    FIXPATH_SRC_W="$FIXPATH_SRC"
+    FIXPATH_BIN_W="$FIXPATH_BIN"
+
+  unix_path="$FIXPATH_SRC_W"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    windows_path=`$CYGPATH -m "$unix_path"`
+    FIXPATH_SRC_W="$windows_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    windows_path=`cmd //c echo $unix_path`
+    FIXPATH_SRC_W="$windows_path"
+  fi
+
+
+  unix_path="$FIXPATH_BIN_W"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    windows_path=`$CYGPATH -m "$unix_path"`
+    FIXPATH_BIN_W="$windows_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    windows_path=`cmd //c echo $unix_path`
+    FIXPATH_BIN_W="$windows_path"
+  fi
+
+    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
+    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
+    cd $FIXPATH_DIR
+    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
     cd $CURDIR
 
-    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
+    if test ! -x $FIXPATH_BIN; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      cat $OUTPUT_ROOT/fixpath1.log
-      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
+      cat $FIXPATH_DIR/fixpath1.log
+      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
 $as_echo_n "checking if fixpath.exe works... " >&6; }
-    cd $OUTPUT_ROOT
-    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
+    cd $FIXPATH_DIR
+    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
+        > $FIXPATH_DIR/fixpath2.log 2>&1
     cd $CURDIR
-    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
+    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      cat $OUTPUT_ROOT/fixpath2.log
+      cat $FIXPATH_DIR/fixpath2.log
       as_fn_error $? "fixpath did not work!" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
   fi
 
 
@@ -44666,7 +44848,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -44792,7 +44974,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -45027,7 +45209,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -45153,7 +45335,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -45649,7 +45831,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -45775,7 +45957,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -45985,7 +46167,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -46111,7 +46293,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -46312,7 +46494,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -46438,7 +46620,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -46639,7 +46821,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -46765,7 +46947,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -46967,7 +47149,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -47093,7 +47275,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -47296,7 +47478,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -47422,7 +47604,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -47621,7 +47803,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -47747,7 +47929,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -47946,7 +48128,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -48072,7 +48254,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -48254,7 +48436,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -48388,7 +48570,7 @@
       # Going to short mode and back again did indeed matter. Since short mode is
       # case insensitive, let's make it lowercase to improve readability.
       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
+      # Now convert it back to Unix-style (cygpath)
       input_path=`$CYGPATH -u "$shortmode_path"`
       new_path="$input_path"
     fi
@@ -49903,7 +50085,7 @@
   if test "x$with_msvcr_dll" != x; then
     # If given explicitely by user, do not probe. If not present, fail directly.
 
-  DLL_NAME="$DLL_NAME"
+  DLL_NAME="$MSVCR_NAME"
   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
   METHOD="--with-msvcr-dll"
   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
@@ -49933,6 +50115,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -49948,9 +50256,183 @@
     if test "x$MSVC_DLL" = x; then
       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
     fi
-  else
-
-  VAR_NAME="MSVCR_DLL"
+    MSVCR_DLL="$MSVC_DLL"
+  elif test "x$DEVKIT_MSVCR_DLL" != x; then
+
+  DLL_NAME="$MSVCR_NAME"
+  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
+  METHOD="devkit"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+    if test "x$MSVC_DLL" = x; then
+      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
+    fi
+    MSVCR_DLL="$MSVC_DLL"
+  else
+
   DLL_NAME="${MSVCR_NAME}"
   MSVC_DLL=
 
@@ -50005,6 +50487,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50054,6 +50662,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50113,6 +50847,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50179,6 +51039,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50242,6 +51228,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50265,137 +51377,9 @@
     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
   fi
 
-  MSVCR_DLL=$MSVC_DLL
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVCR_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVCR_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVCR_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVCR_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVCR_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVCR_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-  MSVCR_DLL=$MSVCR_DLL
-
-
-  fi
+    MSVCR_DLL="$MSVC_DLL"
+  fi
+
 
 
 # Check whether --with-msvcp-dll was given.
@@ -50408,7 +51392,7 @@
     if test "x$with_msvcp_dll" != x; then
       # If given explicitely by user, do not probe. If not present, fail directly.
 
-  DLL_NAME="$DLL_NAME"
+  DLL_NAME="$MSVCP_NAME"
   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
   METHOD="--with-msvcp-dll"
   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
@@ -50438,6 +51422,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50453,9 +51563,183 @@
       if test "x$MSVC_DLL" = x; then
         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
       fi
-    else
-
-  VAR_NAME="MSVCP_DLL"
+      MSVCP_DLL="$MSVC_DLL"
+    elif test "x$DEVKIT_MSVCP_DLL" != x; then
+
+  DLL_NAME="$MSVCP_NAME"
+  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
+  METHOD="devkit"
+  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+    # Need to check if the found msvcr is correct architecture
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH="PE32 executable"
+      else
+        CORRECT_MSVCR_ARCH="PE32+ executable"
+      fi
+    else
+      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+        CORRECT_MSVCR_ARCH=386
+      else
+        CORRECT_MSVCR_ARCH=x86-64
+      fi
+    fi
+    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+      MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+    fi
+  fi
+
+      if test "x$MSVC_DLL" = x; then
+        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
+      fi
+      MSVCP_DLL="$MSVC_DLL"
+    else
+
   DLL_NAME="${MSVCP_NAME}"
   MSVC_DLL=
 
@@ -50510,6 +51794,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50559,6 +51969,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50618,6 +52154,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50684,6 +52346,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50747,6 +52535,132 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$MSVC_DLL" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$MSVC_DLL"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$MSVC_DLL"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    MSVC_DLL="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$MSVC_DLL"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+    fi
+  fi
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
 $as_echo_n "checking for $DLL_NAME... " >&6; }
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50770,137 +52684,9 @@
     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
   fi
 
-  MSVCP_DLL=$MSVC_DLL
-
-  # Only process if variable expands to non-empty
-
-  if test "x$MSVCP_DLL" != x; then
-    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
-  # Input might be given as Windows format, start by converting to
-  # unix format.
-  path="$MSVCP_DLL"
-  new_path=`$CYGPATH -u "$path"`
-
-  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
-  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
-  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
-  # "foo.exe" is OK but "foo" is an error.
-  #
-  # This test is therefore slightly more accurate than "test -f" to check for file precense.
-  # It is also a way to make sure we got the proper file name for the real test later on.
-  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
-  if test "x$test_shortpath" = x; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
-    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
-  fi
-
-  # Call helper function which possibly converts this using DOS-style short mode.
-  # If so, the updated path is stored in $new_path.
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
-    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
-    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
-      # Going to short mode and back again did indeed matter. Since short mode is
-      # case insensitive, let's make it lowercase to improve readability.
-      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-      # Now convert it back to Unix-stile (cygpath)
-      input_path=`$CYGPATH -u "$shortmode_path"`
-      new_path="$input_path"
-    fi
-  fi
-
-  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
-  if test "x$test_cygdrive_prefix" = x; then
-    # As a simple fix, exclude /usr/bin since it's not a real path.
-    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
-      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
-      # a path prefixed by /cygdrive for fixpath to work.
-      new_path="$CYGWIN_ROOT_PATH$input_path"
-    fi
-  fi
-
-
-  if test "x$path" != "x$new_path"; then
-    MSVCP_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
-  fi
-
-    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
-  path="$MSVCP_DLL"
-  has_colon=`$ECHO $path | $GREP ^.:`
-  new_path="$path"
-  if test "x$has_colon" = x; then
-    # Not in mixed or Windows style, start by that.
-    new_path=`cmd //c echo $path`
-  fi
-
-
-  input_path="$new_path"
-  # Check if we need to convert this using DOS-style short mode. If the path
-  # contains just simple characters, use it. Otherwise (spaces, weird characters),
-  # take no chances and rewrite it.
-  # Note: m4 eats our [], so we need to use [ and ] instead.
-  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
-  if test "x$has_forbidden_chars" != x; then
-    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
-    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-  fi
-
-
-  windows_path="$new_path"
-  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-    unix_path=`$CYGPATH -u "$windows_path"`
-    new_path="$unix_path"
-  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
-    new_path="$unix_path"
-  fi
-
-  if test "x$path" != "x$new_path"; then
-    MSVCP_DLL="$new_path"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
-  fi
-
-  # Save the first 10 bytes of this path to the storage, so fixpath can work.
-  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
-    else
-      # We're on a unix platform. Hooray! :)
-      path="$MSVCP_DLL"
-      has_space=`$ECHO "$path" | $GREP " "`
-      if test "x$has_space" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
-        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
-      fi
-
-      # Use eval to expand a potential ~
-      eval path="$path"
-      if test ! -f "$path" && test ! -d "$path"; then
-        as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
-      fi
-
-      MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
-    fi
-  fi
-
-  MSVCP_DLL=$MSVCP_DLL
-
-
-    fi
+      MSVCP_DLL="$MSVC_DLL"
+    fi
+
   fi
 
 
@@ -51415,13 +53201,6 @@
 $as_echo "$ENABLE_SJAVAC" >&6; }
 
 
-  if test "x$ENABLE_SJAVAC" = xyes; then
-    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
-  else
-    SJAVAC_SERVER_DIR=
-  fi
-
-
 
 # Can the C/C++ compiler use precompiled headers?
 
@@ -51849,7 +53628,7 @@
 
 # We're messing a bit with internal autoconf variables to put the config.status
 # in the output directory instead of the current directory.
-CONFIG_STATUS="$OUTPUT_ROOT/config.status"
+CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
 
 # Create the actual output files. Now the main work of configure is done.
 cat >confcache <<\_ACEOF
@@ -53017,7 +54796,7 @@
 
 # Try to move the config.log file to the output directory.
 if test -e ./config.log; then
-  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
+  $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
 fi
 
 # Make the compare script executable
--- a/common/autoconf/spec.gmk.in	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/spec.gmk.in	Sat May 02 18:35:36 2015 -0700
@@ -59,7 +59,7 @@
 MAKE := @MAKE@
 
 # The default make arguments
-MAKE_ARGS = $(MAKE_LOG_FLAGS) -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
+MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
     MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
 
 OUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@
@@ -182,6 +182,7 @@
   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@
@@ -231,13 +232,14 @@
 # Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
 SUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/support
 BUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools
-MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/makesupport
 
 HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
 JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
 IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
 TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
 MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
+# This does not get overridden in a bootcycle build
+CONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@
 
 HOTSPOT_DIST=@HOTSPOT_DIST@
 
@@ -259,7 +261,7 @@
 ENABLE_SJAVAC:=@ENABLE_SJAVAC@
 # Store sjavac server synchronization files here, and
 # the sjavac server log files.
-SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
+SJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
 
 # Number of parallel jobs to use for compilation
 JOBS?=@JOBS@
@@ -353,10 +355,6 @@
 LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
 LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
 
-# On some platforms the linker cannot be used to create executables, thus
-# the need for a separate LDEXE command.
-LDEXE:=@FIXPATH@ @LDEXE@
-
 # LDFLAGS used to link the jdk native launchers (C-code)
 LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
 LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
@@ -369,9 +367,6 @@
 # The flags for linking libstdc++ linker.
 LIBCXX:=@LIBCXX@
 
-# Sometimes a different linker is needed for c++ executables
-LDEXECXX:=@FIXPATH@ @LDEXECXX@
-
 # Compiler and linker flags used when building native tests
 CFLAGS_TESTLIB:=@CFLAGS_TESTLIB@
 CXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
--- a/common/autoconf/toolchain.m4	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/toolchain.m4	Sat May 02 18:35:36 2015 -0700
@@ -189,11 +189,15 @@
   ORG_CFLAGS="$CFLAGS"
   ORG_CXXFLAGS="$CXXFLAGS"
 
+  # autoconf magic only relies on PATH, so update it if tools dir is specified
+  OLD_PATH="$PATH"
+
   # On Windows, we need to detect the visual studio installation first.
   # This will change the PATH, but we need to keep that new PATH even
   # after toolchain detection is done, since the compiler (on x86) uses
   # it for DLL resolution in runtime.
-  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
+  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
+      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
     TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
@@ -203,9 +207,6 @@
     export LIB="$VS_LIB"
   fi
 
-  # autoconf magic only relies on PATH, so update it if tools dir is specified
-  OLD_PATH="$PATH"
-
   # For solaris we really need solaris tools, and not the GNU equivalent.
   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
   # so add that to path before starting to probe.
@@ -662,13 +663,6 @@
     USE_CLANG=true
   fi
   AC_SUBST(USE_CLANG)
-
-  # LDEXE is the linker to use, when creating executables. Not really used.
-  # FIXME: These should just be removed!
-  LDEXE="$LD"
-  LDEXECXX="$LDCXX"
-  AC_SUBST(LDEXE)
-  AC_SUBST(LDEXECXX)
 ])
 
 # Do some additional checks on the detected tools.
--- a/common/autoconf/toolchain_windows.m4	Fri May 01 09:45:44 2015 -0400
+++ b/common/autoconf/toolchain_windows.m4	Sat May 02 18:35:36 2015 -0700
@@ -24,8 +24,8 @@
 #
 
 ################################################################################
-
-VALID_VS_VERSIONS="2010 2012 2013"
+# The order of these defines the priority by which we try to find them.
+VALID_VS_VERSIONS="2013 2012 2010"
 
 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
 VS_VERSION_INTERNAL_2010=100
@@ -72,7 +72,7 @@
     else
       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
     fi
-  
+
     BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
     if test -d "$VS_BASE"; then
       if test -f "$VS_BASE/$VCVARSFILE"; then
@@ -210,6 +210,37 @@
     done
 
     exit 0
+  elif test "x$DEVKIT_VS_VERSION" != x; then
+    VS_VERSION=$DEVKIT_VS_VERSION
+    TOOLCHAIN_VERSION=$VS_VERSION
+    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
+    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
+    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
+    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+    VS_PATH="$TOOLCHAIN_PATH:$PATH"
+
+    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
+    # can still be exported as INCLUDE for compiler invocations without
+    # SYSROOT_CFLAGS
+    OLDIFS="$IFS"
+    IFS=";"
+    for i in $DEVKIT_VS_INCLUDE; do
+      ipath=$i
+      BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
+      VS_INCLUDE="$VS_INCLUDE;$ipath"
+    done
+    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
+    # as LIB for compiler invocations without SYSROOT_LDFLAGS
+    for i in $DEVKIT_VS_LIB; do
+      libpath=$i
+      BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
+      VS_LIB="$VS_LIB;$libpath"
+    done
+    IFS="$OLDIFS"
+
+    AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
+
   elif test "x$with_toolchain_version" != x; then
     # User override; check that it is valid
     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
@@ -262,71 +293,81 @@
   # First-hand choice is to locate and run the vsvars bat file.
   TOOLCHAIN_FIND_VISUAL_STUDIO
 
-  if test "x$VS_ENV_CMD" != x; then
-    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
-    BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
+  # If we have a devkit, skip all of the below.
+  if test "x$DEVKIT_VS_VERSION" = x; then
+    if test "x$VS_ENV_CMD" != x; then
+      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
+      BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
 
-    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
-    AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
+      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+      AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
 
-    # We need to create a couple of temporary files.
-    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
-    $MKDIR -p $VS_ENV_TMP_DIR
+      # We need to create a couple of temporary files.
+      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
+      $MKDIR -p $VS_ENV_TMP_DIR
 
-    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
-    # Instead create a shell script which will set the relevant variables when run.
-    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
-    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
-    WINPATH_BASH="$BASH"
-    BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
+      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
+      # Instead create a shell script which will set the relevant variables when run.
+      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
+      BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
+      WINPATH_BASH="$BASH"
+      BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
 
-    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
-    # script (executable by bash) that will setup the important variables.
-    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
-    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
-    # This will end up something like:
-    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
-    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
-    # These will end up something like:
-    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
-    # The trailing space for everyone except PATH is no typo, but is needed due
-    # to trailing \ in the Windows paths. These will be stripped later.
-    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
+      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
+      # script (executable by bash) that will setup the important variables.
+      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
+      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
+      # This will end up something like:
+      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
+      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
+      # These will end up something like:
+      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
+      # The trailing space for everyone except PATH is no typo, but is needed due
+      # to trailing \ in the Windows paths. These will be stripped later.
+      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
+      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
+          >> $EXTRACT_VC_ENV_BAT_FILE
 
-    # Now execute the newly created bat file.
-    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
-    # Change directory so we don't need to mess with Windows paths in redirects.
-    cd $VS_ENV_TMP_DIR
-    cmd /c extract-vs-env.bat | $CAT
-    cd $CURDIR
+      # Now execute the newly created bat file.
+      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
+      # Change directory so we don't need to mess with Windows paths in redirects.
+      cd $VS_ENV_TMP_DIR
+      cmd /c extract-vs-env.bat | $CAT
+      cd $CURDIR
 
-    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
-      AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
-      AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
-      AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
-      AC_MSG_ERROR([Cannot continue])
-    fi
+      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
+        AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
+        AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
+        AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
+        AC_MSG_ERROR([Cannot continue])
+      fi
 
-    # Now set all paths and other env variables. This will allow the rest of
-    # the configure script to find and run the compiler in the proper way.
-    AC_MSG_NOTICE([Setting extracted environment variables])
-    . $VS_ENV_TMP_DIR/set-vs-env.sh
-    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
-    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
-  else
-    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
-    AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
+      # Now set all paths and other env variables. This will allow the rest of
+      # the configure script to find and run the compiler in the proper way.
+      AC_MSG_NOTICE([Setting extracted environment variables])
+      . $VS_ENV_TMP_DIR/set-vs-env.sh
+      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
+      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
+    else
+      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
+      AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
+    fi
   fi
 
   # At this point, we should have correct variables in the environment, or we can't continue.
   AC_MSG_CHECKING([for Visual Studio variables])
 
-  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
+  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
+      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
       AC_MSG_RESULT([present but broken])
       AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
@@ -403,10 +444,10 @@
   POSSIBLE_MSVC_DLL="$2"
   METHOD="$3"
   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
-    AC_MSG_NOTICE([Found $1 at $POSSIBLE_MSVC_DLL using $METHOD])
-    
+    AC_MSG_NOTICE([Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD])
+
     # Need to check if the found msvcr is correct architecture
-    AC_MSG_CHECKING([found $1 architecture])
+    AC_MSG_CHECKING([found $DLL_NAME architecture])
     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
@@ -426,19 +467,19 @@
     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
       AC_MSG_RESULT([ok])
       MSVC_DLL="$POSSIBLE_MSVC_DLL"
-      AC_MSG_CHECKING([for $1])
+      BASIC_FIXUP_PATH(MSVC_DLL)
+      AC_MSG_CHECKING([for $DLL_NAME])
       AC_MSG_RESULT([$MSVC_DLL])
     else
       AC_MSG_RESULT([incorrect, ignoring])
-      AC_MSG_NOTICE([The file type of the located $1 is $MSVC_DLL_FILETYPE])
+      AC_MSG_NOTICE([The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE])
     fi
   fi
 ])
 
 AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
 [
-  VAR_NAME="$1"
-  DLL_NAME="$2"
+  DLL_NAME="$1"
   MSVC_DLL=
 
   if test "x$MSVC_DLL" = x; then
@@ -463,9 +504,9 @@
     TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
         [well-known location in Boot JDK])
   fi
-  
+
   if test "x$MSVC_DLL" = x; then
-    # Probe: Look in the Windows system32 directory 
+    # Probe: Look in the Windows system32 directory
     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
     BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
@@ -489,7 +530,7 @@
           [search of VS100COMNTOOLS])
     fi
   fi
-      
+
   if test "x$MSVC_DLL" = x; then
     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
     # (This was the original behaviour; kept since it might turn something up)
@@ -506,21 +547,17 @@
 	      | $HEAD --lines 1`
         fi
       fi
-      
+
       TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
           [search of VCINSTALLDIR])
     fi
   fi
-  
+
   if test "x$MSVC_DLL" = x; then
     AC_MSG_CHECKING([for $DLL_NAME])
     AC_MSG_RESULT([no])
     AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
   fi
-
-  $1=$MSVC_DLL
-  BASIC_FIXUP_PATH($1)
-  AC_SUBST($1, [$]$1)
 ])
 
 AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
@@ -530,14 +567,22 @@
 
   if test "x$with_msvcr_dll" != x; then
     # If given explicitely by user, do not probe. If not present, fail directly.
-    TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcr_dll],
-        [--with-msvcr-dll])
+    TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$with_msvcr_dll], [--with-msvcr-dll])
     if test "x$MSVC_DLL" = x; then
       AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
     fi
+    MSVCR_DLL="$MSVC_DLL"
+  elif test "x$DEVKIT_MSVCR_DLL" != x; then
+    TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
+    if test "x$MSVC_DLL" = x; then
+      AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
+    fi  
+    MSVCR_DLL="$MSVC_DLL"
   else
-    TOOLCHAIN_SETUP_MSVC_DLL([MSVCR_DLL], [${MSVCR_NAME}])
+    TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
+    MSVCR_DLL="$MSVC_DLL"
   fi
+  AC_SUBST(MSVCR_DLL)
 
   AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
       [path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
@@ -545,13 +590,21 @@
   if test "x$MSVCP_NAME" != "x"; then
     if test "x$with_msvcp_dll" != x; then
       # If given explicitely by user, do not probe. If not present, fail directly.
-      TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcp_dll],
-          [--with-msvcp-dll])
+      TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$with_msvcp_dll], [--with-msvcp-dll])
       if test "x$MSVC_DLL" = x; then
         AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
       fi
+      MSVCP_DLL="$MSVC_DLL"
+    elif test "x$DEVKIT_MSVCP_DLL" != x; then
+      TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
+      if test "x$MSVC_DLL" = x; then
+        AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
+      fi  
+      MSVCP_DLL="$MSVC_DLL"
     else
-      TOOLCHAIN_SETUP_MSVC_DLL([MSVCP_DLL], [${MSVCP_NAME}])
+      TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
+      MSVCP_DLL="$MSVC_DLL"
     fi
+    AC_SUBST(MSVCP_DLL)
   fi
 ])
--- a/common/bin/unshuffle_list.txt	Fri May 01 09:45:44 2015 -0400
+++ b/common/bin/unshuffle_list.txt	Sat May 02 18:35:36 2015 -0700
@@ -1293,6 +1293,9 @@
 jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/p11_md.c : jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.c
 jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/p11_md.h : jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.h
 jdk/src/jdk.deploy.osx/macosx/classes/com/apple/concurrent/package.html : jdk/src/macosx/classes/com/apple/concurrent/package.html
+jdk/src/jdk.deploy.osx/macosx/classes/apple/applescript : jdk/src/macosx/classes/apple/applescript
+jdk/src/jdk.deploy.osx/macosx/classes/apple/security : jdk/src/macosx/classes/apple/security
+jdk/src/jdk.deploy.osx/macosx/classes/com/apple/concurrent : jdk/src/macosx/classes/com/apple/concurrent
 jdk/src/jdk.deploy.osx/macosx/native/libapplescriptengine : jdk/src/macosx/native/apple/applescript
 jdk/src/jdk.deploy.osx/macosx/native/libosx/CFileManager.m : jdk/src/macosx/native/com/apple/eio/CFileManager.m
 jdk/src/jdk.deploy.osx/macosx/native/libosx/Dispatch.m : jdk/src/macosx/native/com/apple/concurrent/Dispatch.m
--- a/make/CompileJavaModules.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/CompileJavaModules.gmk	Sat May 02 18:35:36 2015 -0700
@@ -262,6 +262,26 @@
 
 ################################################################################
 
+java.instrument_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
+java.logging_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
+java.management_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
+java.prefs_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
+java.transaction_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
 java.sql_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
 
@@ -340,6 +360,14 @@
 
 ################################################################################
 
+java.security.jgss_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
+java.smartcardio_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+
+################################################################################
+
 java.xml.crypto_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 java.xml.crypto_COPY := .dtd .xml
 java.xml.crypto_CLEAN := .properties
--- a/make/Help.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/Help.gmk	Sat May 02 18:35:36 2015 -0700
@@ -88,28 +88,15 @@
 	$(info $(_)                        # make test TEST="jdk_lang jdk_net")
 	$(info )
 	$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))),\
-	    $(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration))
+	    $(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
         # We need a dummy rule otherwise make will complain
 	@true
 
-print-targets:
-	$(if $(any_spec_file), ,\
-	  @echo "Note: More targets will be available when at least one configuration exists." 1>&2\
-	)
-	@echo $(ALL_TARGETS)
-
-print-modules:
-	$(if $(any_spec_file), \
-	  @$(MAKE) -s -f $(topdir)/make/Main.gmk -I $(topdir)/make/common SPEC=$(any_spec_file) print-modules \
-	, \
-	  @echo print-modules can currently only be run when at least one configuration exists \
-	)
-
 print-configurations:
 	$(foreach var, $(all_confs), $(info $(var)))
         # We need a dummy rule otherwise make will complain
 	@true
 
-ALL_GLOBAL_TARGETS := help print-modules print-targets print-configurations
+ALL_GLOBAL_TARGETS := help print-configurations
 
 .PHONY: $(ALL_GLOBAL_TARGETS)
--- a/make/Images.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/Images.gmk	Sat May 02 18:35:36 2015 -0700
@@ -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
@@ -38,7 +38,7 @@
 ############################################################################
 
 MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
-               jdk.security.auth jdk.security.jgss jdk.pack200
+               jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom
 
 # providers
 PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \
@@ -57,6 +57,10 @@
   PROVIDER_MODULES += jdk.crypto.ucrypto
 endif
 
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  MAIN_MODULES += jdk.accessibility
+endif
+
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   MAIN_MODULES += jdk.deploy.osx
 endif
--- a/make/Init.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/Init.gmk	Sat May 02 18:35:36 2015 -0700
@@ -37,84 +37,102 @@
 # serially, regardless of -j.
 .NOTPARALLEL:
 
-# If included from the top-level Makefile then topdir is set, but not when
-# recursively calling ourself with a spec.
-ifeq ($(topdir),)
-  topdir := $(strip $(patsubst %/make/, %, $(dir $(lastword $(MAKEFILE_LIST)))))
-endif
-
-# Our helper functions. Will include $(SPEC) if $(HAS_SPEC) is true.
-include $(topdir)/make/InitSupport.gmk
-
-# Here are "global" targets, i.e. targets that can be executed without having a configuration.
-# This will define ALL_GLOBAL_TARGETS.
-include $(topdir)/make/Help.gmk
-
-# Extract main targets from Main.gmk.
-ifneq ($(any_spec_file), )
-  ifeq ($(wildcard $(dir $(any_spec_file))/make-support/module-deps.gmk),)
-    # If make-support does not exist, we need to build the genmodules java tool first.
-    $(info Creating data for first make execution in new configuration...)
-    ignore_output := $(shell $(MAKE) -r -R -f $(topdir)/make/Main.gmk \
-        -I $(topdir)/make/common SPEC=$(any_spec_file) NO_RECIPES=true FRC)
-    $(info Done)
-  endif
-  ALL_MAIN_TARGETS := $(shell $(MAKE) -r -R -f $(topdir)/make/Main.gmk \
-      -I $(topdir)/make/common SPEC=$(any_spec_file) NO_RECIPES=true print-targets)
-else
-  # Without at least a single valid configuration, we cannot extract any real
-  # targets. To provide a helpful error message about the missing configuration
-  # later on, accept whatever targets the user has provided for now.
-  ALL_MAIN_TARGETS := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default)
-endif
-
-# Targets provided by this file.
-ALL_INIT_TARGETS := reconfigure
-
-ALL_TARGETS := $(sort $(ALL_GLOBAL_TARGETS) $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS))
-
-ifneq ($(findstring qp, $(MAKEFLAGS)),)
+ifeq ($(HAS_SPEC),)
   ##############################################################################
-  # When called with -qp, assume an external part (e.g. bash completion) is trying
-  # to understand our targets. Just list our targets and do no more checking.
+  # This is the default mode. We have not been recursively called with a SPEC.
   ##############################################################################
 
-  $(ALL_TARGETS):
-
-  .PHONY: $(ALL_TARGETS)
-
-else ifeq ($(HAS_SPEC),)
-
-  ##############################################################################
-  # This is the normal case, we have been called from the command line by the
-  # user and we need to call ourself back with a proper SPEC.
-  ##############################################################################
+  # Include our helper functions.
+  include $(topdir)/make/InitSupport.gmk
 
-  $(eval $(call CheckControlVariables))
-  $(eval $(call CheckDeprecatedEnvironment))
-  $(eval $(call CheckInvalidMakeFlags))
-
-  $(eval $(call ParseConfCheckOption))
+  # Here are "global" targets, i.e. targets that can be executed without having
+  # a configuration. This will define ALL_GLOBAL_TARGETS.
+  include $(topdir)/make/Help.gmk
 
-  # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE and MAKE_LOG_FLAGS.
-  $(eval $(call ParseLogLevel))
-
-  ifneq ($(findstring $(LOG_LEVEL),info debug trace),)
-    $(info Running make as '$(strip $(MAKE) $(MFLAGS) $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
-  endif
+  # Targets provided by Init.gmk.
+  ALL_INIT_TARGETS := print-modules print-targets reconfigure
 
   # CALLED_TARGETS is the list of targets that the user provided,
   # or "default" if unspecified.
   CALLED_TARGETS := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default)
-  CALLED_SPEC_TARGETS := $(filter $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS), $(CALLED_TARGETS))
-  ifneq ($(CALLED_SPEC_TARGETS),)
-    # We have at least one non-global target, which need a SPEC
+
+  # Extract non-global targets that require a spec file.
+  CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
+
+  # If we have only global targets, or if we are called with -qp (assuming an
+  # external part, e.g. bash completion, is trying to understand our targets),
+  # we will skip SPEC location and the sanity checks.
+  ifeq ($(CALLED_SPEC_TARGETS), )
+    ONLY_GLOBAL_TARGETS := true
+  endif
+  ifneq ($(findstring qp, $(MAKEFLAGS)),)
+    ONLY_GLOBAL_TARGETS := true
+  endif
+
+  ifeq ($(ONLY_GLOBAL_TARGETS), true)
+    ############################################################################
+    # We have only global targets, or are called with -pq.
+    ############################################################################
+
+    ifeq ($(wildcard $(SPEC)), )
+      # If we have no SPEC provided, we will just make a "best effort" target list.
+      # First try to grab any available pre-existing main-targets.gmk.
+      main_targets_file := $(firstword $(wildcard $(build_dir)/*/make-support/main-targets.gmk))
+      ifneq ($(main_targets_file), )
+        # Extract the SPEC that corresponds to this main-targets.gmk file.
+        SPEC := $(patsubst %/make-support/main-targets.gmk, %/spec.gmk, $(main_targets_file))
+      else
+        # None found, pick an arbitrary SPEC for which to generate a file
+        SPEC := $(firstword $(all_spec_files))
+      endif
+    endif
+
+    ifneq ($(wildcard $(SPEC)), )
+      $(eval $(call DefineMainTargets, LAZY, $(SPEC)))
+    else
+      # If we have no configurations we can not provide any main targets.
+      ALL_MAIN_TARGETS :=
+    endif
+
+    ALL_TARGETS := $(sort $(ALL_GLOBAL_TARGETS) $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS))
+
+    # Just list all our targets.
+    $(ALL_TARGETS):
+
+    .PHONY: $(ALL_TARGETS)
+
+  else
+    ############################################################################
+    # This is the normal case, we have been called from the command line by the
+    # user and we need to call ourself back with a proper SPEC.
+    # We have at least one non-global target, so we need to find a spec file.
+    ############################################################################
+
+    # Basic checks on environment and command line.
+    $(eval $(call CheckControlVariables))
+    $(eval $(call CheckDeprecatedEnvironment))
+    $(eval $(call CheckInvalidMakeFlags))
+
+    # Check that CONF_CHECK is valid.
+    $(eval $(call ParseConfCheckOption))
+
+    # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE and MAKE_LOG_FLAGS.
+    $(eval $(call ParseLogLevel))
+
+    # After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
     $(eval $(call ParseConfAndSpec))
-    # Now SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails)
 
+    # Extract main targets from Main.gmk using the spec(s) provided. In theory,
+    # with multiple specs, we should find the intersection of targets provided
+    # by all specs, but we approximate this by an arbitrary spec from the list.
+    # This will setup ALL_MAIN_TARGETS.
+    $(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
+
+    # Separate called targets depending on type.
     INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
-    SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(CALLED_SPEC_TARGETS))
-    PARALLEL_TARGETS := $(filter-out $(INIT_TARGETS) $(SEQUENTIAL_TARGETS), $(CALLED_SPEC_TARGETS))
+    MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
+    SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS))
+    PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
 
     # The spec files depend on the autoconf source code. This check makes sure
     # the configuration is up to date after changes to configure.
@@ -126,30 +144,41 @@
         else ifeq ($(CONF_CHECK), auto)
 	  @echo "Note: The configuration is not up to date for '$(lastword $(subst /, , $(dir $@)))'."
 	  @( cd $(topdir) && \
-	      $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -f $(topdir)/make/Init.gmk SPEC=$@ HAS_SPEC=true \
+	      $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
+	      SPEC=$@ HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
 	      reconfigure )
         else ifeq ($(CONF_CHECK), ignore)
           # Do nothing
         endif
 
-    # Unless reconfigure is explicitely called, let all targets depend on the spec files to be up to date.
-    ifeq ($(findstring reconfigure, $(CALLED_SPEC_TARGETS)), )
-      $(CALLED_SPEC_TARGETS): $(SPECS)
+    # Unless reconfigure is explicitely called, let all main targets depend on
+    # the spec files to be up to date.
+    ifeq ($(findstring reconfigure, $(INIT_TARGETS)), )
+      $(MAIN_TARGETS): $(SPECS)
     endif
 
-    # The recipe will be run once for every target specified, but we only want to execute the
-    # recipe a single time, hence the TARGET_DONE with a dummy command if true.
-    $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS):
+    make-info:
+        ifneq ($(findstring $(LOG_LEVEL),info debug trace),)
+	  $(info Running make as '$(strip $(MAKE) $(MFLAGS) \
+	      $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
+        endif
+
+    # Now the init and main targets will be called, once for each SPEC. The
+    # recipe will be run once for every target specified, but we only want to
+    # execute the recipe a single time, hence the TARGET_DONE with a dummy
+    # command if true.
+    $(ALL_INIT_TARGETS) $(ALL_MAIN_TARGETS): make-info
 	@$(if $(TARGET_DONE), \
 	  true \
 	, \
 	  $(foreach spec, $(SPECS), \
 	    ( cd $(topdir) && \
-	    $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -j 1 -f $(topdir)/make/Init.gmk \
-	        SPEC=$(spec) HAS_SPEC=true \
+	    $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
+	        SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
 	        USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
 	        LOG_LEVEL=$(LOG_LEVEL) LOG_NOFILE=$(LOG_NOFILE) \
-	        INIT_TARGETS="$(INIT_TARGETS)" SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
+	        INIT_TARGETS="$(INIT_TARGETS)" \
+	        SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
 	        PARALLEL_TARGETS="$(PARALLEL_TARGETS)"  \
 	        main ) && \
 	  ) true \
@@ -158,7 +187,7 @@
 
     .PHONY: $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS)
 
-  endif # has $(CALLED_SPEC_TARGETS)
+  endif # $(ONLY_GLOBAL_TARGETS)!=true
 
 else # HAS_SPEC=true
 
@@ -168,6 +197,14 @@
   # file.
   ##############################################################################
 
+  include $(SPEC)
+
+  # Our helper functions.
+  include $(TOPDIR)/make/InitSupport.gmk
+
+  # Verify that the spec file we included seems okay.
+  $(eval $(call CheckSpecSanity))
+
   ifeq ($(LOG_NOFILE), true)
     # Disable log wrapper if LOG=[level,]nofile was given
     override BUILD_LOG_WRAPPER :=
@@ -177,7 +214,19 @@
     OUTPUT_SYNC_FLAG := -O$(OUTPUT_SYNC)
   endif
 
-  $(eval $(call CheckSpecSanity))
+  ##############################################################################
+  # Init targets
+  ##############################################################################
+
+  print-modules:
+	( cd $(TOPDIR) && \
+	    $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
+	    NO_RECIPES=true print-modules )
+
+  print-targets:
+	( cd $(TOPDIR) && \
+	    $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
+	    NO_RECIPES=true print-targets )
 
   reconfigure:
         ifneq ($(CONFIGURE_COMMAND_LINE), )
@@ -188,42 +237,43 @@
 	( cd $(OUTPUT_ROOT) && PATH="$(ORIGINAL_PATH)" \
 	    $(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
 
-  main-init:
-	$(call RotateLogFiles)
-	$(BUILD_LOG_WRAPPER) $(PRINTF) "Building target(s) '$(strip \
-	    $(INIT_TARGETS) $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS) \
-	    )' in configuration '$(CONF_NAME)'\n"
+  ##############################################################################
+  # The main target, for delegating into Main.gmk
+  ##############################################################################
 
+  MAIN_TARGETS := $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS)
+  TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
+      '$(strip $(MAIN_TARGETS))' in configuration '$(CONF_NAME)'
 
   # MAKEOVERRIDES is automatically set and propagated by Make to sub-Make calls.
   # We need to clear it of the init-specific variables. The user-specified
   # variables are explicitely propagated using $(USER_MAKE_VARS).
   main: MAKEOVERRIDES :=
 
-  main: $(INIT_TARGETS) main-init
-        ifneq ($(SEQUENTIAL_TARGETS), )
-          # Don't touch build output dir since we might be cleaning. That means
-	  # no log wrapper.
-	  ( cd $(TOPDIR) && \
-	      $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
-	      $(SEQUENTIAL_TARGETS) \
-	  )
+  main: $(INIT_TARGETS)
+        ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
+	  $(call RotateLogFiles)
+	  $(BUILD_LOG_WRAPPER) $(PRINTF) "Building $(TARGET_DESCRIPTION)\n"
+          ifneq ($(SEQUENTIAL_TARGETS), )
+            # Don't touch build output dir since we might be cleaning. That
+            # means no log wrapper.
+	    ( cd $(TOPDIR) && \
+	        $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
+	        $(SEQUENTIAL_TARGETS) )
+          endif
+          ifneq ($(PARALLEL_TARGETS), )
+	    $(call StartGlobalTimer)
+	    $(call PrepareSmartJavac)
+	    ( cd $(TOPDIR) && \
+	        $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
+	        -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
+	        $(PARALLEL_TARGETS) )
+	    $(call CleanupSmartJavac)
+	    $(call StopGlobalTimer)
+	    $(call ReportBuildTimes)
+          endif
+	  $(BUILD_LOG_WRAPPER) $(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n"
         endif
-        ifneq ($(PARALLEL_TARGETS), )
-	  $(call StartGlobalTimer)
-	  $(call PrepareSmartJavac)
-	  ( cd $(TOPDIR) && \
-	      $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
-	      -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
-	      $(PARALLEL_TARGETS) \
-	  )
-	  $(call CleanupSmartJavac)
-	  $(call StopGlobalTimer)
-	  $(call ReportBuildTimes)
-        endif
-	$(BUILD_LOG_WRAPPER) $(PRINTF) "Finished building target(s) '$(strip \
-	    $(INIT_TARGETS) $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS) \
-	    )' in configuration '$(CONF_NAME)'\n"
 
-  .PHONY: reconfigure main-init main
+  .PHONY: print-targets print-modules reconfigure main
 endif
--- a/make/InitSupport.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/InitSupport.gmk	Sat May 02 18:35:36 2015 -0700
@@ -32,13 +32,6 @@
 ifndef _INITSUPPORT_GMK
 _INITSUPPORT_GMK := 1
 
-# Setup information about available configurations, if any.
-build_dir=$(topdir)/build
-all_spec_files=$(wildcard $(build_dir)/*/spec.gmk)
-# Extract the configuration names from the path
-all_confs=$(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
-any_spec_file=$(firstword $(all_spec_files))
-
 ifeq ($(HAS_SPEC),)
   ##############################################################################
   # Helper functions for the initial part of Init.gmk, before the spec file is
@@ -62,17 +55,24 @@
   # line, but in reverse order to what the user entered.
   COMMAND_LINE_VARIABLES := $(subst \#,\ , $(call reverse, $(subst \ ,\#,$(MAKEOVERRIDES))))
 
-  # A list like FOO="val1" BAR="val2" containing all user-supplied make variables
-  # that we should propagate.
+  # A list like FOO="val1" BAR="val2" containing all user-supplied make
+  # variables that we should propagate.
   USER_MAKE_VARS := $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \
       $(MAKEOVERRIDES))
 
+  # Setup information about available configurations, if any.
+  build_dir=$(topdir)/build
+  all_spec_files=$(wildcard $(build_dir)/*/spec.gmk)
+  # Extract the configuration names from the path
+  all_confs=$(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
+
   # Check for unknown command-line variables
   define CheckControlVariables
     command_line_variables := $$(strip $$(foreach var, \
         $$(subst \ ,_,$$(MAKEOVERRIDES)), \
         $$(firstword $$(subst =, , $$(var)))))
-    unknown_command_line_variables := $$(strip $$(filter-out $$(MAKE_CONTROL_VARIABLES), $$(command_line_variables)))
+    unknown_command_line_variables := $$(strip \
+        $$(filter-out $$(MAKE_CONTROL_VARIABLES), $$(command_line_variables)))
     ifneq ($$(unknown_command_line_variables), )
       $$(info Note: Command line contains non-control variables:)
       $$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
@@ -182,7 +182,7 @@
       override SPEC :=
     else
       # Use spec.gmk files in the build output directory
-      ifeq ($$(any_spec_file),)
+      ifeq ($$(all_spec_files),)
         $$(info Error: No configurations found for $$(topdir).)
         $$(info Please run 'bash configure' to create a configuration.)
         $$(info )
@@ -196,7 +196,8 @@
           matching_confs := $$(strip $$(all_confs))
         else
           # Otherwise select those that contain the given CONF string
-          matching_confs := $$(strip $$(foreach var, $$(all_confs), $$(if $$(findstring $$(CONF), $$(var)), $$(var))))
+          matching_confs := $$(strip $$(foreach var, $$(all_confs), \
+              $$(if $$(findstring $$(CONF), $$(var)), $$(var))))
         endif
         ifeq ($$(matching_confs),)
           $$(info Error: No configurations found matching CONF=$$(CONF).)
@@ -231,6 +232,37 @@
     endif
   endef
 
+  # Extract main targets from Main.gmk using the spec provided in $2.
+  #
+  # Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
+  # Param 2: The SPEC file to use.
+  define DefineMainTargets
+
+    # We will start by making sure the main-targets.gmk file is removed, if
+    # make has not been restarted. By the -include, we will trigger the
+    # rule for generating the file (which is never there since we removed it),
+    # thus generating it fresh, and make will restart, incrementing the restart
+    # count.
+    main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
+
+    ifeq ($$(MAKE_RESTARTS),)
+      # Only do this if make has not been restarted, and if we do not force it.
+      ifeq ($(strip $1), FORCE)
+        $$(shell rm -f $$(main_targets_file))
+      endif
+    endif
+
+    $$(main_targets_file):
+	@( cd $$(topdir) && \
+	    $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(topdir)/make/Main.gmk \
+	    -I $$(topdir)/make/common SPEC=$(strip $2) NO_RECIPES=true \
+	    LOG_LEVEL=$$(LOG_LEVEL) \
+	    create-main-targets-include )
+
+    # Now include main-targets.gmk. This will define ALL_MAIN_TARGETS.
+    -include $$(main_targets_file)
+  endef
+
   define PrintConfCheckFailed
 	@echo ' '
 	@echo "Please rerun configure! Easiest way to do this is by running"
@@ -242,10 +274,9 @@
 else # $(HAS_SPEC)=true
   ##############################################################################
   # Helper functions for the 'main' target. These functions assume a single,
-  # proper and existing SPEC is provided, and will load it.
+  # proper and existing SPEC is included.
   ##############################################################################
 
-  include $(SPEC)
   include $(SRC_ROOT)/make/common/MakeBase.gmk
 
   # Define basic logging setup
@@ -263,11 +294,11 @@
 
   # Sanity check the spec file, so it matches this source code
   define CheckSpecSanity
-    ifneq ($$(topdir), $$(TOPDIR))
-      ifneq ($$(topdir), $$(ORIGINAL_TOPDIR))
-        ifneq ($$(topdir), $$(CANONICAL_TOPDIR))
+    ifneq ($$(ACTUAL_TOPDIR), $$(TOPDIR))
+      ifneq ($$(ACTUAL_TOPDIR), $$(ORIGINAL_TOPDIR))
+        ifneq ($$(ACTUAL_TOPDIR), $$(CANONICAL_TOPDIR))
           $$(info Error: SPEC mismatch! Current working directory)
-          $$(info $$(topdir))
+          $$(info $$(ACTUAL_TOPDIR))
           $$(info does not match either TOPDIR, ORIGINAL_TOPDIR or CANONICAL_TOPDIR)
           $$(info $$(TOPDIR))
           $$(info $$(ORIGINAL_TOPDIR))
--- a/make/Javadoc.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/Javadoc.gmk	Sat May 02 18:35:36 2015 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,8 @@
 JNLP_FIRST_COPYRIGHT_YEAR = 1998
 PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
 JDKNET_FIRST_COPYRIGHT_YEAR = 2014
+JACCESSAPI_FIRST_COPYRIGHT_YEAR = 2002
+
 
 # Oracle name
 FULL_COMPANY_NAME = Oracle and/or its affiliates
@@ -1233,6 +1235,58 @@
 
 #############################################################
 #
+# jaccessdocs - Java Accessibility Utilities
+#
+
+ALL_OTHER_TARGETS += jaccessdocs
+
+JACCESSAPI_DOCDIR := $(JRE_API_DOCSDIR)/accessibility/jaccess/spec
+JACCESSAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
+JACCESSAPI_DOCTITLE := JACCESS API
+JACCESSAPI_WINDOWTITLE := JACCESS API
+JACCESSAPI_HEADER := <strong>JACCESS API</strong>
+JACCESSAPI_BOTTOM := $(call CommonBottom,$(JACCESSAPI_FIRST_COPYRIGHT_YEAR))
+# JACCESSAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+JACCESSAPI_INDEX_HTML = $(JACCESSAPI_DOCDIR)/index.html
+JACCESSAPI_OPTIONS_FILE = $(DOCSTMPDIR)/jaccess.options
+JACCESSAPI_PACKAGES_FILE = $(DOCSTMPDIR)/jaccess.packages
+
+jaccessdocs: $(JACCESSAPI_INDEX_HTML)
+
+# Set relative location to core api document root
+$(JACCESSAPI_INDEX_HTML): GET2DOCSDIR=$(JACCESSAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(JACCESSAPI_INDEX_HTML): $(JACCESSAPI_OPTIONS_FILE) $(JACCESSAPI_PACKAGES_FILE) $(COREAPI_INDEX_FILE)
+	$(prep-javadoc)
+	$(call JavadocSummary,$(JACCESSAPI_OPTIONS_FILE),$(JACCESSAPI_PACKAGES_FILE))
+	$(JAVADOC_CMD) -d $(@D) \
+	    @$(JACCESSAPI_OPTIONS_FILE) @$(JACCESSAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(JACCESSAPI_OPTIONS_FILE):
+	$(prep-target)
+	@($(call COMMON_JAVADOCFLAGS) ; \
+	  $(call COMMON_JAVADOCTAGS) ; \
+	  $(call OptionOnly,-Xdoclint:all) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(JACCESSAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(JACCESSAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(JACCESSAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(JACCESSAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+	  $(call OptionTrip,-linkoffline,$(JACCESSAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+	) >> $@
+
+# Create a file with the package names in it
+$(JACCESSAPI_PACKAGES_FILE): $(call PackageDependencies,$(JACCESSAPI_PKGS))
+	$(prep-target)
+	$(call PackageFilter,$(JACCESSAPI_PKGS))
+
+#############################################################
+#
 # jdk.net docs
 #
 
--- a/make/Main.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/Main.gmk	Sat May 02 18:35:36 2015 -0700
@@ -392,6 +392,9 @@
   # links against libosxapp.
   jdk.deploy.osx-libs: java.desktop-libs
 
+  # jdk.accessibility depends on java.desktop
+  jdk.accessibility-libs: java.desktop-libs
+
   # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
   # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
   # virtual target.
@@ -541,7 +544,7 @@
 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native
 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
-CLEAN_PHASES := gensrc java native include
+CLEAN_PHASES := gensrc java native include docs
 CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
 CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
 # Construct targets of the form clean-$module-$phase
@@ -550,7 +553,7 @@
 
 # Remove everything, except the output from configure.
 clean: $(CLEAN_DIR_TARGETS)
-	($(CD) $(OUTPUT_ROOT) && $(RM) -r source_tips build.log* build-trace*.log*)
+	($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*)
 	$(ECHO) Cleaned all build artifacts.
 
 $(CLEAN_DIR_TARGETS):
@@ -574,13 +577,11 @@
 # while classes and touch files end up in jdk.
 clean-support: clean-jdk
 
-clean-docs: clean-docstemp
-
-# Remove everything, including configure configuration.
-# If the output directory was created by configure and now becomes empty, remove it as well.
+# Remove everything, including configure configuration. If the output
+# directory was created by configure and now becomes empty, remove it as well.
 dist-clean: clean
-	($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments \
-	    Makefile compare.sh tmp javacservers)
+	($(CD) $(OUTPUT_ROOT) && \
+	    $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide)
 	$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
 	  if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
 	    $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
@@ -607,14 +608,19 @@
 
 ################################################################################
 
+# The following targets are intentionally not added to ALL_TARGETS since they
+# are internal only, to support Init.gmk.
+
 print-targets:
 	  @$(ECHO) $(sort $(ALL_TARGETS))
 
 print-modules:
 	  @$(ECHO) $(sort $(ALL_MODULES))
 
-# print-* targets intentionally not added to ALL_TARGETS since they are internal only.
-# The corresponding external targets are in Help.gmk
+create-main-targets-include:
+	  @$(ECHO) $(LOG_INFO) Generating main target list
+	  @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
+	      $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
 
 ################################################################################
 
--- a/make/MainSupport.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/MainSupport.gmk	Sat May 02 18:35:36 2015 -0700
@@ -41,46 +41,60 @@
 # Cleans the dir given as $1
 define CleanDir
 	@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
-	@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
 	@$(PRINTF) " done\n"
 endef
 
 define CleanTest
 	@$(PRINTF) "Cleaning test $(strip $1) ..."
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
 	@$(PRINTF) " done\n"
 endef
 
 define Clean-gensrc
 	@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(strip $1)
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(strip $1)
 	@$(PRINTF) " done\n"
 endef
 
 define Clean-java
 	@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
-	@$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/misc/$(strip $1)
-	@$(PRINTF) " done\n"
-	@$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/misc/$(strip $1)
+	$(PRINTF) " done\n"
+	$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
 	@$(PRINTF) " done\n"
 endef
 
 define Clean-native
 	@$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs-stripped/$(strip $1)
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped/$(strip $1)
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs-stripped/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped/$(strip $1)
 	@$(PRINTF) " done\n"
 endef
 
 define Clean-include
 	@$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
-	@$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
+	@$(PRINTF) " done\n"
+endef
+
+define Clean-docs
+	@$(PRINTF) "Cleaning docs ..."
+	@$(PRINTF) "\n" $(LOG_DEBUG)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
+	$(RM) -r $(IMAGES_OUTPUTDIR)/docs
 	@$(PRINTF) " done\n"
 endef
 
--- a/make/common/MakeBase.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/common/MakeBase.gmk	Sat May 02 18:35:36 2015 -0700
@@ -36,6 +36,10 @@
   $(error MakeBase.gmk needs SPEC set to a proper spec.gmk)
 endif
 
+# By defining this pseudo target, make will automatically remove targets
+# if their recipe fails so that a rebuild is automatically triggered on the
+# next make invocation.
+.DELETE_ON_ERROR:
 
 ##############################
 # Functions
@@ -484,6 +488,13 @@
       $(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)))
 
 ################################################################################
+# Assign a variable only if it is empty
+# Param 1 - Variable to assign
+# Param 2 - Value to assign
+SetIfEmpty = \
+    $(if $($(strip $1)),,$(eval $(strip $1) := $2))
+
+################################################################################
 
 ifeq ($(OPENJDK_TARGET_OS),solaris)
   # On Solaris, if the target is a symlink and exists, cp won't overwrite.
--- a/make/common/NON_CORE_PKGS.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/common/NON_CORE_PKGS.gmk	Sat May 02 18:35:36 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -99,6 +99,8 @@
       jdk.net \
       jdk.management.cmm
 
+JACCESSAPI_PKGS = com.sun.java.accessibility.util
+
 # non-core packages in rt.jar
 NON_CORE_PKGS = $(DOMAPI_PKGS) \
     $(MGMT_PKGS) \
@@ -110,4 +112,5 @@
     $(SMARTCARDIO_PKGS) \
     $(SCTPAPI_PKGS) \
     $(APPLE_EXT_PKGS) \
-    $(JDK_PKGS)
+    $(JDK_PKGS) \
+    $(JACCESSAPI_PKGS)
--- a/make/common/NativeCompilation.gmk	Fri May 01 09:45:44 2015 -0400
+++ b/make/common/NativeCompilation.gmk	Sat May 02 18:35:36 2015 -0700
@@ -34,6 +34,73 @@
   $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
 endif
 
+################################################################################
+# Define a native toolchain configuration that can be used by
+# SetupNativeCompilation calls
+#
+# Parameter 1 is the name of the toolchain definition
+#
+# Remaining parameters are named arguments:
+#   EXTENDS - Optional parent definition to get defaults from
+#   CC - The C compiler
+#   CXX - The C++ compiler
+#   LD - The Linker
+#   AR - Static linker
+#   AS - Assembler
+#   MT - Windows MT tool
+#   RC - Windows RC tool
+#   SYSROOT_CFLAGS - Compiler flags for using the specific sysroot
+#   SYSROOT_LDFLAGS - Linker flags for using the specific sysroot
+DefineNativeToolchain = $(NamedParamsMacroTemplate)
+define DefineNativeToolchainBody
+  # If extending another definition, get default values from that,
+  # otherwise, nothing more needs to be done as variable assignments
+  # already happened in NamedParamsMacroTemplate.
+  ifneq ($$($1_EXTENDS), )
+    $$(call SetIfEmpty, $1_CC, $$($$($1_EXTENDS)_CC))
+    $$(call SetIfEmpty, $1_CXX, $$($$($1_EXTENDS)_CXX))
+    $$(call SetIfEmpty, $1_LD, $$($$($1_EXTENDS)_LD))
+    $$(call SetIfEmpty, $1_AR, $$($$($1_EXTENDS)_AR))
+    $$(call SetIfEmpty, $1_AS, $$($$($1_EXTENDS)_AS))
+    $$(call SetIfEmpty, $1_MT, $$($$($1_EXTENDS)_MT))
+    $$(call SetIfEmpty, $1_RC, $$($$($1_EXTENDS)_RC))
+    $$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_EXTENDS)_SYSROOT_CFLAGS))
+    $$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_EXTENDS)_SYSROOT_LDFLAGS))
+  endif
+endef
+
+# Create a default toolchain with the main compiler and linker
+$(eval $(call DefineNativeToolchain, TOOLCHAIN_DEFAULT, \
+    CC := $(CC), \
+    CXX := $(CXX), \
+    LD := $(LD), \
+    AR := $(AR), \
+    AS := $(AS), \
+    MT := $(MT), \
+    RC := $(RC), \
+    SYSROOT_CFLAGS := $(SYSROOT_CFLAGS), \
+    SYSROOT_LDFLAGS := $(SYSROOT_LDFLAGS), \
+))
+
+# Create a toolchain where linking is done with the C++ linker
+$(eval $(call DefineNativeToolchain, TOOLCHAIN_LINK_CXX, \
+    EXTENDS := TOOLCHAIN_DEFAULT, \
+    LD := $(LDCXX), \
+))
+
+# Create a toolchain with the BUILD compiler, used for build tools that
+# are to be run during the build.
+# The BUILD_SYSROOT_*FLAGS variables are empty for now.
+$(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD, \
+    EXTENDS := TOOLCHAIN_DEFAULT, \
+    CC := $(BUILD_CC), \
+    LD := $(BUILD_LD), \
+    SYSROOT_CFLAGS := $(BUILD_SYSROOT_CFLAGS), \
+    SYSROOT_LDFLAGS := $(BUILD_SYSROOT_LDFLAGS), \
+))
+
+################################################################################
+
 # Extensions of files handled by this macro.
 NATIVE_SOURCE_EXTENSIONS := %.s %.c %.cpp %.m %.mm
 
@@ -70,6 +137,7 @@
     -e 's/\#.*//' \
     -e 's/^[^:]*: *//' \
     -e 's/ *\\$$$$//' \
+    -e 's/^[	 ]*//' \
     -e '/^$$$$/ d' \
     -e 's/$$$$/ :/' \
     #
@@ -170,8 +238,8 @@
 # and the targets generated are listed in a variable by that name.
 #
 # Remaining parameters are named arguments. These include:
+#   TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
 #   SRC one or more directory roots to scan for C/C++ files.
-#   LANG C or C++
 #   CFLAGS the compiler flags to be used, used both for C and C++.
 #   CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
 #   LDFLAGS the linker flags to be used, used both for C and C++.
@@ -192,7 +260,7 @@
 #   REORDER reorder file
 #   DEBUG_SYMBOLS add debug symbols (if configured on)
 #   CC the compiler to use, default is $(CC)
-#   LDEXE the linker to use for linking executables, default is $(LDEXE)
+#   LD the linker to use, default is $(LD)
 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
 #   DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
 SetupNativeCompilation = $(NamedParamsMacroTemplate)
@@ -288,39 +356,28 @@
     $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
   endif
 
-  ifeq (,$$($1_LANG))
-    $$(error You have to specify LANG for native compilation $1)
-  endif
-  ifeq (C,$$($1_LANG))
-    ifeq ($$($1_LDEXE),)
-      $1_LDEXE:=$(LDEXE)
-    endif
-    ifeq ($$($1_LD),)
-      $1_LD:=$(LD)
+  # Setup the toolchain to be used
+  $$(call SetIfEmpty, $1_TOOLCHAIN, TOOLCHAIN_DEFAULT)
+  $$(call SetIfEmpty, $1_CC, $$($$($1_TOOLCHAIN)_CC))
+  $$(call SetIfEmpty, $1_CXX, $$($$($1_TOOLCHAIN)_CXX))
+  $$(call SetIfEmpty, $1_LD, $$($$($1_TOOLCHAIN)_LD))
+  $$(call SetIfEmpty, $1_AR, $$($$($1_TOOLCHAIN)_AR))
+  $$(call SetIfEmpty, $1_AS, $$($$($1_TOOLCHAIN)_AS))
+  $$(call SetIfEmpty, $1_MT, $$($$($1_TOOLCHAIN)_MT))
+  $$(call SetIfEmpty, $1_RC, $$($$($1_TOOLCHAIN)_RC))
+  $$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
+  $$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
+
+  ifneq ($$($1_MANIFEST), )
+    ifeq ($$($1_MANIFEST_VERSION), )
+      $$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
     endif
-  else
-    ifeq (C++,$$($1_LANG))
-      ifeq ($$($1_LD),)
-        $1_LD:=$(LDCXX)
-      endif
-      ifeq ($$($1_LDEXE),)
-        $1_LDEXE:=$(LDEXECXX)
-      endif
-    else
-      $$(error Unknown native language $$($1_LANG) for $1)
-    endif
-  endif
-
-  ifeq ($$($1_CC),)
-    $1_CC:=$(CC)
-  endif
-  ifeq ($$($1_CXX),)
-    $1_CXX:=$(CXX)
   endif
 
   # Make sure the dirs exist.
   $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
-  $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
+  $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),, \
+      $$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
 
   # Find all files in the source trees. Sort to remove duplicates.
   $1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
@@ -451,9 +508,9 @@
   # Track variable changes for all variables that affect the compilation command
   # lines for all object files in this setup. This includes at least all the
   # variables used in the call to add_native_source below.
-  $1_COMPILE_VARDEPS := $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $(SYSROOT_CFLAGS) \
+  $1_COMPILE_VARDEPS := $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
       $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) \
-      $$($1_CC) $$($1_CXX) $$($1_ASFLAGS) \
+      $$($1_CC) $$($1_CXX) $$($1_AS) $$($1_ASFLAGS) \
       $$(foreach s, $$($1_SRCS), \
           $$($1_$$(notdir $$s)_CFLAGS) $$($1_$$(notdir $$s)_CXXFLAGS))
   $1_COMPILE_VARDEPS_FILE := $$(call DependOnVariable, $1_COMPILE_VARDEPS, \
@@ -462,9 +519,9 @@
   # Now call add_native_source for each source file we are going to compile.
   $$(foreach p,$$($1_SRCS), \
       $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
-          $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $(SYSROOT_CFLAGS), \
+          $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS), \
           $$($1_CC), \
-          $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $(SYSROOT_CFLAGS), \
+          $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS), \
           $$($1_CXX), $$($1_ASFLAGS))))
 
   # Setup rule for printing progress info when compiling source files.
@@ -489,29 +546,21 @@
       -include $$($1_RES_DEP)
       -include $$($1_RES_DEP_TARGETS)
 
-      $1_RES_VARDEPS := $(RC) $$($1_RC_FLAGS)
+      $1_RES_VARDEPS := $$($1_RC) $$($1_RC_FLAGS)
       $1_RES_VARDEPS_FILE := $$(call DependOnVariable, $1_RES_VARDEPS, \
           $$($1_RES).vardeps)
 
       $$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
 		$(ECHO) $(LOG_INFO) "Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$(notdir $$($1_TARGET)))"
-		$(RC) $$($1_RC_FLAGS) $(SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
+		$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
 		    $$($1_VERSIONINFO_RESOURCE)
                 # Windows RC compiler does not support -showIncludes, so we mis-use CL for this.
-		$(CC) $$($1_RC_FLAGS) $(SYSROOT_CFLAGS) -showIncludes -nologo -TC \
+		$$($1_CC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
 		    $(CC_OUT_OPTION)$$($1_RES_DEP).obj $$($1_VERSIONINFO_RESOURCE) > $$($1_RES_DEP).raw 2>&1 || exit 0
 		($(ECHO) $$($1_RES): \\ \
 		&& $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEP).raw) > $$($1_RES_DEP)
 		$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEP) > $$($1_RES_DEP_TARGETS)
     endif
-    ifneq (,$$($1_MANIFEST))
-      $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
-      IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
-      $1_MANIFEST_VARDEPS_FILE := $$(call DependOnVariable, IMVERSIONVALUE, \
-          $$($1_GEN_MANIFEST).vardeps)
-      $$($1_GEN_MANIFEST): $$($1_MANIFEST) $$($1_MANIFEST_VARDEPS_FILE)
-		$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
-    endif
   endif
 
   # mapfile doesnt seem to be implemented on macosx (yet??)
@@ -622,15 +671,15 @@
 
     $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
 
-    $1_VARDEPS := $$($1_LD) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
-        $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
+    $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
+        $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_CREATE_DEBUGINFO_CMDS)
     $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
 
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
         $$($1_DEBUGINFO_EXTRA_DEPS) $$($1_VARDEPS_FILE)
 		$(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)"
-		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(SYSROOT_LDFLAGS) \
+		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		    $(LD_OUT_OPTION)$$@ \
 		    $$($1_EXPECTED_OBJS) $$($1_RES) \
 		    $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
@@ -644,14 +693,15 @@
   endif
 
   ifneq (,$$($1_STATIC_LIBRARY))
-    $1_VARDEPS := $(AR) $$($1_ARFLAGS) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
+    $1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LDFLAGS_SUFFIX) \
+        $$($1_EXTRA_LDFLAGS_SUFFIX)
     $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
 
     # Generating a static library, ie object file archive.
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_VARDEPS_FILE)
 	$(ECHO) $(LOG_INFO) "Archiving $$($1_STATIC_LIBRARY)"
-	$(AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
+	$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
 	    $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
   endif
 
@@ -659,20 +709,23 @@
     # A executable binary has been specified, setup the target for it.
     $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
 
-    $1_VARDEPS := $$($1_LDEXE) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
-        $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
+    $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
+        $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_MT) \
+        $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION)
     $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
         $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
 
-    $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST) \
+    $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_MANIFEST) \
         $$($1_DEBUGINFO_EXTRA_DEPS) $$($1_VARDEPS_FILE)
 		$(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)"
-		$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(SYSROOT_LDFLAGS) \
+		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		    $(EXE_OUT_OPTION)$$($1_TARGET) \
 		    $$($1_EXPECTED_OBJS) $$($1_RES) \
 		    $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
-                ifneq (,$$($1_GEN_MANIFEST))
-		  $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
+                ifeq ($(OPENJDK_TARGET_OS), windows)
+                  ifneq ($$($1_MANIFEST), )
+		    $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_PROGRAM).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
+                  endif
                 endif
                 # This only works if the openjdk_codesign identity is present on the system. Let
                 # silently fail otherwise.
--- a/make/jprt.properties	Fri May 01 09:45:44 2015 -0400
+++ b/make/jprt.properties	Sat May 02 18:35:36 2015 -0700
@@ -123,6 +123,12 @@
     ${my.i586.default.build.configure.args}				\
     ${jprt.productOpen.build.configure.args}
 
+jprt.windows_i586_6.2.build.configure.args=                             \
+    --with-toolchain-version=2013                                       \
+    ${jprt.i586.build.configure.args}
+jprt.windows_x64_6.2.build.configure.args=                              \
+    --with-toolchain-version=2013
+
 ########
 #
 # Build targets and options (default/jdk)
@@ -138,8 +144,8 @@
     linux_i586_2.6-{product|fastdebug},					\
     linux_x64_2.6-{product|fastdebug},					\
     macosx_x64_10.9-{product|fastdebug},				\
-    windows_i586_6.1-{product|fastdebug},				\
-    windows_x64_6.1-{product|fastdebug}
+    windows_i586_6.2-{product|fastdebug},				\
+    windows_x64_6.2-{product|fastdebug}
 
 # Test target list (no fastdebug & limited c2 testing)
 my.test.target.set=							\
@@ -148,8 +154,8 @@
     linux_i586_2.6-product-{c1|c2}-TESTNAME,				\
     linux_x64_2.6-product-c2-TESTNAME,					\
     macosx_x64_10.9-product-c2-TESTNAME,				\
-    windows_i586_6.1-product-c1-TESTNAME,				\
-    windows_x64_6.1-product-c2-TESTNAME
+    windows_i586_6.2-product-c1-TESTNAME,				\
+    windows_x64_6.2-product-c2-TESTNAME
 
 # Default vm test targets (testset=default)
 my.test.targets.default=						\
@@ -260,8 +266,8 @@
     linux_i586_2.6-{product|fastdebug},					\
     linux_x64_2.6-{product|fastdebug},			\
     macosx_x64_10.9-{product|fastdebug},				\
-    windows_i586_6.1-{product|fastdebug},				\
-    windows_x64_6.1-{product|fastdebug},			\
+    windows_i586_6.2-{product|fastdebug},				\
+    windows_x64_6.2-{product|fastdebug},			\
     solaris_x64_5.11-{debugOpen},					\
     linux_x64_2.6-{productOpen},					\
     ${my.additional.build.targets.hotspot}
@@ -350,43 +356,43 @@
     macosx_x64_10.9-{product|fastdebug}-c2-jbb_ParOldGC
 
 my.test.targets.hotspot.windows.i586=					\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-jvm98,			\
-    windows_i586_6.1-{product|fastdebug}-c2-jvm98_nontiered,		\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-scimark,		\
-    windows_i586_6.1-product-{c1|c2}-runThese8,				\
-    windows_i586_6.1-product-{c1|c2}-runThese8_Xcomp_lang,		\
-    windows_i586_6.1-product-{c1|c2}-runThese8_Xcomp_vm,		\
-    windows_i586_6.1-fastdebug-c1-runThese8_Xshare,			\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_G1,		\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC,	\
-    windows_i586_6.1-{product|fastdebug}-{c1|c2}-jbb_default,		\
-    windows_i586_6.1-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    windows_i586_6.1-product-{c1|c2}-jbb_ParallelGC,			\
-    windows_i586_6.1-product-{c1|c2}-jbb_CMS,				\
-    windows_i586_6.1-product-{c1|c2}-jbb_G1,				\
-    windows_i586_6.1-product-{c1|c2}-jbb_ParOldGC
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-jvm98,			\
+    windows_i586_6.2-{product|fastdebug}-c2-jvm98_nontiered,		\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-scimark,		\
+    windows_i586_6.2-product-{c1|c2}-runThese8,				\
+    windows_i586_6.2-product-{c1|c2}-runThese8_Xcomp_lang,		\
+    windows_i586_6.2-product-{c1|c2}-runThese8_Xcomp_vm,		\
+    windows_i586_6.2-fastdebug-c1-runThese8_Xshare,			\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_G1,		\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC,	\
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-jbb_default,		\
+    windows_i586_6.2-{product|fastdebug}-c2-jbb_default_nontiered,	\
+    windows_i586_6.2-product-{c1|c2}-jbb_ParallelGC,			\
+    windows_i586_6.2-product-{c1|c2}-jbb_CMS,				\
+    windows_i586_6.2-product-{c1|c2}-jbb_G1,				\
+    windows_i586_6.2-product-{c1|c2}-jbb_ParOldGC
 
 my.test.targets.hotspot.windows.x64=					\
-    windows_x64_6.1-{product|fastdebug}-c2-jvm98,			\
-    windows_x64_6.1-{product|fastdebug}-c2-jvm98_nontiered,		\
-    windows_x64_6.1-{product|fastdebug}-c2-scimark,			\
-    windows_x64_6.1-product-c2-runThese8,				\
-    windows_x64_6.1-product-c2-runThese8_Xcomp_lang,			\
-    windows_x64_6.1-product-c2-runThese8_Xcomp_vm,			\
-    windows_x64_6.1-{product|fastdebug}-c2-GCBasher_SerialGC,		\
-    windows_x64_6.1-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
-    windows_x64_6.1-{product|fastdebug}-c2-GCBasher_CMS,		\
-    windows_x64_6.1-{product|fastdebug}-c2-GCBasher_G1,			\
-    windows_x64_6.1-{product|fastdebug}-c2-GCBasher_ParOldGC,		\
-    windows_x64_6.1-{product|fastdebug}-c2-jbb_default,			\
-    windows_x64_6.1-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    windows_x64_6.1-product-c2-jbb_CMS,					\
-    windows_x64_6.1-product-c2-jbb_ParallelGC,				\
-    windows_x64_6.1-product-c2-jbb_G1,					\
-    windows_x64_6.1-product-c2-jbb_ParOldGC
+    windows_x64_6.2-{product|fastdebug}-c2-jvm98,			\
+    windows_x64_6.2-{product|fastdebug}-c2-jvm98_nontiered,		\
+    windows_x64_6.2-{product|fastdebug}-c2-scimark,			\
+    windows_x64_6.2-product-c2-runThese8,				\
+    windows_x64_6.2-product-c2-runThese8_Xcomp_lang,			\
+    windows_x64_6.2-product-c2-runThese8_Xcomp_vm,			\
+    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_SerialGC,		\
+    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
+    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_CMS,		\
+    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_G1,			\
+    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_ParOldGC,		\
+    windows_x64_6.2-{product|fastdebug}-c2-jbb_default,			\
+    windows_x64_6.2-{product|fastdebug}-c2-jbb_default_nontiered,	\
+    windows_x64_6.2-product-c2-jbb_CMS,					\
+    windows_x64_6.2-product-c2-jbb_ParallelGC,				\
+    windows_x64_6.2-product-c2-jbb_G1,					\
+    windows_x64_6.2-product-c2-jbb_ParOldGC
 
 # Some basic "smoke" tests for OpenJDK builds
 my.test.targets.hotspot.open=						\
@@ -419,8 +425,8 @@
   macosx_x64_10.9-*-default-hotspot_basicvmtest,                        \
   solaris_sparcv9_5.11-*-default-hotspot_basicvmtest,                   \
   solaris_x64_5.11-*-default-hotspot_basicvmtest,                       \
-  windows_i586_6.1-*-default-hotspot_basicvmtest,                       \
-  windows_x64_6.1-*-default-hotspot_basicvmtest
+  windows_i586_6.2-*-default-hotspot_basicvmtest,                       \
+  windows_x64_6.2-*-default-hotspot_basicvmtest
   
 my.make.rule.test.targets.hotspot.internalvmtests=			\
   solaris_sparcv9_5.11-fastdebug-c2-hotspot_internalvmtests,		\
@@ -428,8 +434,8 @@
   linux_i586_2.6-fastdebug-c2-hotspot_internalvmtests,			\
   linux_x64_2.6-fastdebug-c2-hotspot_internalvmtests,			\
   macosx_x64_10.9-fastdebug-c2-hotspot_internalvmtests,			\
-  windows_i586_6.1-fastdebug-c2-hotspot_internalvmtests,		\
-  windows_x64_6.1-fastdebug-c2-hotspot_internalvmtests
+  windows_i586_6.2-fastdebug-c2-hotspot_internalvmtests,		\
+  windows_x64_6.2-fastdebug-c2-hotspot_internalvmtests
 
 my.make.rule.test.targets.hotspot.reg.group=				\
   solaris_sparcv9_5.11-fastdebug-c2-GROUP,				\
@@ -437,10 +443,10 @@
   linux_i586_2.6-fastdebug-c2-GROUP,					\
   linux_x64_2.6-fastdebug-c2-GROUP,					\
   macosx_x64_10.9-fastdebug-c2-GROUP,					\
-  windows_i586_6.1-fastdebug-c2-GROUP,					\
-  windows_x64_6.1-fastdebug-c2-GROUP,					\
+  windows_i586_6.2-fastdebug-c2-GROUP,					\
+  windows_x64_6.2-fastdebug-c2-GROUP,					\
   linux_i586_2.6-fastdebug-c1-GROUP,					\
-  windows_i586_6.1-fastdebug-c1-GROUP
+  windows_i586_6.2-fastdebug-c1-GROUP
 
 # Hotspot jtreg tests
 my.make.rule.test.targets.hotspot.reg=						\
--- a/modules.xml	Fri May 01 09:45:44 2015 -0400
+++ b/modules.xml	Sat May 02 18:35:36 2015 -0700
@@ -253,12 +253,17 @@
       <to>java.logging</to>
       <to>java.management</to>
       <to>java.naming</to>
+      <to>java.prefs</to>
       <to>java.rmi</to>
       <to>java.security.jgss</to>
       <to>java.security.sasl</to>
       <to>java.sql</to>
+      <to>java.xml</to>
+      <to>java.xml.ws</to>
       <to>jdk.charsets</to>
+      <to>jdk.crypto.pkcs11</to>
       <to>jdk.deploy.osx</to>
+      <to>jdk.httpserver</to>
       <to>jdk.jartool</to>
       <to>jdk.jconsole</to>
       <to>jdk.jvmstat</to>
@@ -266,6 +271,8 @@
       <to>jdk.pack200</to>
       <to>jdk.security.auth</to>
       <to>jdk.security.jgss</to>
+      <to>jdk.snmp</to>
+      <to>java.instrument</to>
     </export>
     <export>
       <name>sun.net.dns</name>
@@ -759,7 +766,7 @@
     </export>
     <export>
       <name>sun.awt</name>
-      <to>jdk.accessbridge</to>
+      <to>jdk.accessibility</to>
     </export>
   </module>
   <module>
@@ -1859,6 +1866,23 @@
     </export>
   </module>
   <module>
+    <name>jdk.xml.dom</name>
+    <depend>java.base</depend>
+    <depend re-exports="true">java.xml</depend>
+    <export>
+      <name>org.w3c.dom.css</name>
+    </export>
+    <export>
+      <name>org.w3c.dom.html</name>
+    </export>
+    <export>
+      <name>org.w3c.dom.stylesheets</name>
+    </export>
+    <export>
+      <name>org.w3c.dom.xpath</name>
+    </export>
+  </module>
+  <module>
     <name>jdk.xml.ws</name>
     <depend>java.base</depend>
     <depend>java.compiler</depend>
@@ -1873,4 +1897,9 @@
     <name>jdk.zipfs</name>
     <depend>java.base</depend>
   </module>
+  <module>
+    <name>jdk.accessibility</name>
+    <depend>java.base</depend>
+    <depend>java.desktop</depend>
+  </module>
 </modules>