changeset 1576:8ec86b8f819f

Merging recent jdk9/dev changes into kulla/dev
author jlahoda
date Tue, 07 Jul 2015 13:51:13 +0200
parents bd5e490ebc9e dd33ad17d6fa
children a04fb3e6c9d1
files make/CompileJavaModules.gmk make/Images.gmk modules.xml
diffstat 26 files changed, 1252 insertions(+), 363 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Jun 02 09:17:20 2015 +0200
+++ b/.hgtags	Tue Jul 07 13:51:13 2015 +0200
@@ -309,3 +309,8 @@
 82cf9aab9a83e41c8194ba01af9666afdb856cbe jdk9-b64
 7c31f9d7b932f7924f1258d52885b1c7c3e078c2 jdk9-b65
 dc6e8336f51bb6b67b7245766179eab5ca7720b4 jdk9-b66
+f546760134eb861fcfecd4ce611b0040b0d25a6a jdk9-b67
+70e4272790b6199e9ca89df2758ff9cb58ec4125 jdk9-b68
+1bcfd6b8726582cff5a42dbfc75903e36f9dd4fe jdk9-b69
+eed77fcd77711fcdba05f18fc22f37d86efb243c jdk9-b70
+c706ef5ea5da00078dc5e4334660315f7d99c15b jdk9-b71
--- a/common/autoconf/basics.m4	Tue Jun 02 09:17:20 2015 +0200
+++ b/common/autoconf/basics.m4	Tue Jul 07 13:51:13 2015 +0200
@@ -436,7 +436,6 @@
   BASIC_PATH_PROGS(CYGPATH, cygpath)
   BASIC_PATH_PROGS(READLINK, [greadlink readlink])
   BASIC_PATH_PROGS(DF, df)
-  BASIC_PATH_PROGS(SETFILE, SetFile)
   BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
 ])
 
@@ -574,10 +573,11 @@
   )
 
   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
-    # detect if Xcode is installed by running xcodebuild -version
+    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
+    # If not, detect if Xcode is installed by running xcodebuild -version
     # if no Xcode installed, xcodebuild exits with 1
     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
-    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
+    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
       # We need to use xcodebuild in the toolchain dir provided by the user, this will
       # fall back on the stub binary in /usr/bin/xcodebuild
       AC_PATH_PROG([XCODEBUILD], [xcodebuild], [/usr/bin/xcodebuild], [$TOOLCHAIN_PATH])
@@ -961,6 +961,7 @@
         AC_MSG_RESULT([yes])
       fi
     fi
+    BASIC_REQUIRE_PROGS(SETFILE, SetFile)
   fi
 ])
 
--- a/common/autoconf/build-aux/config.guess	Tue Jun 02 09:17:20 2015 +0200
+++ b/common/autoconf/build-aux/config.guess	Tue Jul 07 13:51:13 2015 +0200
@@ -86,4 +86,11 @@
   fi
 fi
 
+# Test and fix cpu on Macosx when C preprocessor is not on the path
+echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null
+if test $? = 0; then
+  REAL_CPU=`uname -m`
+  OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
+fi
+
 echo $OUT
--- a/common/autoconf/flags.m4	Tue Jun 02 09:17:20 2015 +0200
+++ b/common/autoconf/flags.m4	Tue Jul 07 13:51:13 2015 +0200
@@ -338,14 +338,16 @@
       # no adjustment
       ;;
     slowdebug )
-      # Add runtime stack smashing and undefined behavior checks
-      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
-      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
+      # Add runtime stack smashing and undefined behavior checks.
+      # Not all versions of gcc support -fstack-protector
+      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
+      FLAGS_COMPILER_CHECK_ARGUMENTS([$STACK_PROTECTOR_CFLAG], [], [STACK_PROTECTOR_CFLAG=""])
+
+      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       ;;
     esac
   fi
-  AC_SUBST(CFLAGS_DEBUG_OPTIONS)
-  AC_SUBST(CXXFLAGS_DEBUG_OPTIONS)
 
   # Optimization levels
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
--- a/common/autoconf/generated-configure.sh	Tue Jun 02 09:17:20 2015 +0200
+++ b/common/autoconf/generated-configure.sh	Tue Jul 07 13:51:13 2015 +0200
@@ -718,8 +718,6 @@
 C_O_FLAG_NORM
 C_O_FLAG_HI
 C_O_FLAG_HIGHEST
-CXXFLAGS_DEBUG_OPTIONS
-CFLAGS_DEBUG_OPTIONS
 CXXFLAGS_DEBUG_SYMBOLS
 CFLAGS_DEBUG_SYMBOLS
 CXX_FLAG_DEPS
@@ -857,6 +855,7 @@
 OS_VERSION_MAJOR
 PKG_CONFIG
 BASH_ARGS
+SETFILE
 CODESIGN
 XATTR
 DSYMUTIL
@@ -948,7 +947,6 @@
 build_cpu
 build
 CPIO
-SETFILE
 DF
 READLINK
 CYGPATH
@@ -1169,7 +1167,6 @@
 CYGPATH
 READLINK
 DF
-SETFILE
 CPIO
 UNZIP
 ZIP
@@ -1182,6 +1179,7 @@
 DSYMUTIL
 XATTR
 CODESIGN
+SETFILE
 PKG_CONFIG
 JAVA
 JAVAC
@@ -2051,7 +2049,6 @@
   CYGPATH     Override default value for CYGPATH
   READLINK    Override default value for READLINK
   DF          Override default value for DF
-  SETFILE     Override default value for SETFILE
   CPIO        Override default value for CPIO
   UNZIP       Override default value for UNZIP
   ZIP         Override default value for ZIP
@@ -2064,6 +2061,7 @@
   DSYMUTIL    Override default value for DSYMUTIL
   XATTR       Override default value for XATTR
   CODESIGN    Override default value for CODESIGN
+  SETFILE     Override default value for SETFILE
   PKG_CONFIG  path to pkg-config utility
   JAVA        Override default value for JAVA
   JAVAC       Override default value for JAVAC
@@ -4366,7 +4364,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1432629750
+DATE_WHEN_GENERATED=1435822080
 
 ###############################################################################
 #
@@ -13060,192 +13058,6 @@
   # Publish this variable in the help.
 
 
-  if test "x$SETFILE" = x; then
-    # The variable is not set by user, try to locate tool using the code snippet
-    for ac_prog in SetFile
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_SETFILE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $SETFILE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-SETFILE=$ac_cv_path_SETFILE
-if test -n "$SETFILE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
-$as_echo "$SETFILE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$SETFILE" && break
-done
-
-  else
-    # The variable is set, but is it from the command line or the environment?
-
-    # Try to remove the string !SETFILE! from our list.
-    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
-    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
-      # If it failed, the variable was not from the command line. Ignore it,
-      # but warn the user (except for BASH, which is always set by the calling BASH).
-      if test "xSETFILE" != xBASH; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
-$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
-      fi
-      # Try to locate tool using the code snippet
-      for ac_prog in SetFile
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_SETFILE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $SETFILE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-SETFILE=$ac_cv_path_SETFILE
-if test -n "$SETFILE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
-$as_echo "$SETFILE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$SETFILE" && break
-done
-
-    else
-      # If it succeeded, then it was overridden by the user. We will use it
-      # for the tool.
-
-      # First remove it from the list of overridden variables, so we can test
-      # for unknown variables in the end.
-      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
-
-      # Check if the provided tool contains a complete path.
-      tool_specified="$SETFILE"
-      tool_basename="${tool_specified##*/}"
-      if test "x$tool_basename" = "x$tool_specified"; then
-        # A command without a complete path is provided, search $PATH.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
-$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
-        # Extract the first word of "$tool_basename", so it can be a program name with args.
-set dummy $tool_basename; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_SETFILE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $SETFILE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-SETFILE=$ac_cv_path_SETFILE
-if test -n "$SETFILE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
-$as_echo "$SETFILE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-        if test "x$SETFILE" = x; then
-          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
-        fi
-      else
-        # Otherwise we believe it is a complete path. Use it as it is.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
-$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
-$as_echo_n "checking for SETFILE... " >&6; }
-        if test ! -x "$tool_specified"; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
-        fi
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
-      fi
-    fi
-  fi
-
-
-
-
-  # Publish this variable in the help.
-
-
   if test "x$CPIO" = x; then
     # The variable is not set by user, try to locate tool using the code snippet
     for ac_prog in cpio bsdcpio
@@ -15142,10 +14954,11 @@
 
 
   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
-    # detect if Xcode is installed by running xcodebuild -version
+    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
+    # If not, detect if Xcode is installed by running xcodebuild -version
     # if no Xcode installed, xcodebuild exits with 1
     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
-    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
+    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
       # We need to use xcodebuild in the toolchain dir provided by the user, this will
       # fall back on the stub binary in /usr/bin/xcodebuild
       # Extract the first word of "xcodebuild", so it can be a program name with args.
@@ -19655,6 +19468,199 @@
 $as_echo "yes" >&6; }
       fi
     fi
+
+
+
+  # Publish this variable in the help.
+
+
+  if test "x$SETFILE" = x; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in SetFile
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SETFILE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SETFILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+SETFILE=$ac_cv_path_SETFILE
+if test -n "$SETFILE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
+$as_echo "$SETFILE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$SETFILE" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !SETFILE! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xSETFILE" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in SetFile
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SETFILE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SETFILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+SETFILE=$ac_cv_path_SETFILE
+if test -n "$SETFILE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
+$as_echo "$SETFILE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$SETFILE" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if the provided tool contains a complete path.
+      tool_specified="$SETFILE"
+      tool_basename="${tool_specified##*/}"
+      if test "x$tool_basename" = "x$tool_specified"; then
+        # A command without a complete path is provided, search $PATH.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
+        # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SETFILE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SETFILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+SETFILE=$ac_cv_path_SETFILE
+if test -n "$SETFILE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
+$as_echo "$SETFILE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+        if test "x$SETFILE" = x; then
+          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+        fi
+      else
+        # Otherwise we believe it is a complete path. Use it as it is.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
+$as_echo_n "checking for SETFILE... " >&6; }
+        if test ! -x "$tool_specified"; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+      fi
+    fi
+  fi
+
+
+
+  if test "x$SETFILE" = x; then
+    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
+  fi
+
+
   fi
 
 
@@ -41837,15 +41843,81 @@
       # no adjustment
       ;;
     slowdebug )
-      # Add runtime stack smashing and undefined behavior checks
-      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
-      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
+      # Add runtime stack smashing and undefined behavior checks.
+      # Not all versions of gcc support -fstack-protector
+      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
+$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
+  supports=yes
+
+  saved_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  supports=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  CFLAGS="$saved_cflags"
+
+  saved_cxxflags="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  supports=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  CXXFLAGS="$saved_cxxflags"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+  else
+    STACK_PROTECTOR_CFLAG=""
+  fi
+
+
+      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       ;;
     esac
   fi
 
-
-
   # Optimization levels
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
@@ -42889,7 +42961,7 @@
         if test "x$x_libraries" = xNONE; then
           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
             x_libraries="$SYSROOT/usr/X11R6/lib"
-          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
             x_libraries="$SYSROOT/usr/lib64"
           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
             x_libraries="$SYSROOT/usr/lib"
--- a/common/autoconf/libraries.m4	Tue Jun 02 09:17:20 2015 +0200
+++ b/common/autoconf/libraries.m4	Tue Jul 07 13:51:13 2015 +0200
@@ -113,7 +113,7 @@
         if test "x$x_libraries" = xNONE; then
           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
             x_libraries="$SYSROOT/usr/X11R6/lib"
-          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
             x_libraries="$SYSROOT/usr/lib64"
           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
             x_libraries="$SYSROOT/usr/lib"
--- a/common/bin/compare.sh	Tue Jun 02 09:17:20 2015 +0200
+++ b/common/bin/compare.sh	Tue Jul 07 13:51:13 2015 +0200
@@ -1188,28 +1188,11 @@
         OTHER_JDK="$OTHER/install/jdk"
         OTHER_JRE="$OTHER/install/jre"
         echo "Selecting install images for compare"
-    elif [ -d "$THIS/deploy/jdk" -o -d "$THIS/deploy/images/jdk" ] \
-	     && [ -d "$OTHER/deploy/jdk" -o -d "$OTHER/deploy/images/jdk" ]; then
-	if [ -d "$THIS/deploy/images/jdk" ]; then
-            THIS_JDK="$THIS/deploy/images/jdk"
-            THIS_JRE="$THIS/deploy/images/jre"
-	else
-            THIS_JDK="$THIS/deploy/jdk"
-            THIS_JRE="$THIS/deploy/jre"
-	fi
-	if [ -d "$OTHER/deploy/images/jdk" ]; then
-            OTHER_JDK="$OTHER/deploy/images/jdk"
-            OTHER_JRE="$OTHER/deploy/images/jre"
-	else
-            OTHER_JDK="$OTHER/deploy/jdk"
-            OTHER_JRE="$OTHER/deploy/jre"
-	fi
-        echo "Selecting deploy images for compare"
-    elif [ -d "$THIS/deploy/images/jdk" ] && [ -d "$OTHER/deploy/jdk" ]; then
-        THIS_JDK="$THIS/deploy/jdk"
-        THIS_JRE="$THIS/deploy/jre"
-        OTHER_JDK="$OTHER/deploy/jdk"
-        OTHER_JRE="$OTHER/deploy/jre"
+    elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/deploy/images/jdk" ]; then
+        THIS_JDK="$THIS/images/jdk"
+        THIS_JRE="$THIS/images/jre"
+        OTHER_JDK="$OTHER/deploy/images/jdk"
+        OTHER_JRE="$OTHER/deploy/images/jre"
         echo "Selecting deploy images for compare"
     elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then
         THIS_JDK="$THIS/images/jdk"
@@ -1221,30 +1204,28 @@
         echo "No common images found."
         exit 1
     fi
+    echo "  $THIS_JDK"
+    echo "  $OTHER_JDK"
 
-    if [ -d "$THIS/deploy/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \
-	     && [ -d "$OTHER/deploy/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then
+    if [ -d "$THIS/images/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \
+	     && [ -d "$OTHER/images/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then
 	if [ -d "$THIS/deploy/images/jdk-bundle" ]; then
             THIS_JDK_BUNDLE="$THIS/deploy/images/jdk-bundle"
             THIS_JRE_BUNDLE="$THIS/deploy/images/jre-bundle"
 	else
-            THIS_JDK_BUNDLE="$THIS/deploy/jdk-bundle"
-            THIS_JRE_BUNDLE="$THIS/deploy/jre-bundle"
+            THIS_JDK_BUNDLE="$THIS/images/jdk-bundle"
+            THIS_JRE_BUNDLE="$THIS/images/jre-bundle"
 	fi
 	if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then
             OTHER_JDK_BUNDLE="$OTHER/deploy/images/jdk-bundle"
             OTHER_JRE_BUNDLE="$OTHER/deploy/images/jre-bundle"
 	else
-            OTHER_JDK_BUNDLE="$OTHER/deploy/jdk-bundle"
-            OTHER_JRE_BUNDLE="$OTHER/deploy/jre-bundle"
+            OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle"
+            OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle"
 	fi
-        echo "Also comparing deploy macosx bundles"
-    elif [ -d "$THIS/images/jdk-bundle" ] && [ -d "$OTHER/images/jdk-bundle" ]; then
-        THIS_JDK_BUNDLE="$THIS/images/jdk-bundle"
-        THIS_JRE_BUNDLE="$THIS/images/jre-bundle"
-        OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle"
-        OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle"
         echo "Also comparing macosx bundles"
+        echo "  $THIS_JDK_BUNDLE"
+        echo "  $OTHER_JDK_BUNDLE"
     fi
 
     if [ -d "$THIS/deploy/bundles" -o -d "$THIS/deploy/images/bundles" ] \
@@ -1262,19 +1243,21 @@
         echo "Also comparing deploy javadoc bundles"
     fi
 
-    if [ -d "$THIS/deploy/JavaAppletPlugin.plugin" -o -d "$THIS/deploy/images/JavaAppletPlugin.plugin" ] \
-	     && [ -d "$OTHER/deploy/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then
-	if [ -d "$THIS/deploy/images/bundles" ]; then
+    if [ -d "$THIS/images/JavaAppletPlugin.plugin" ] \
+	     && [ -d "$OTHER/images/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then
+	if [ -d "$THIS/images/JavaAppletPlugin.plugin" ]; then
+            THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/images/JavaAppletPlugin.plugin"
+	else
             THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/images/JavaAppletPlugin.plugin"
+	fi
+	if [ -d "$OTHER/images/JavaAppletPlugin.plugin" ]; then
+            OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/images/JavaAppletPlugin.plugin"
 	else
-            THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin"
-	fi
-	if [ -d "$OTHER/deploy/images/bundles" ]; then
             OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/images/JavaAppletPlugin.plugin"
-	else
-            OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin"
 	fi
         echo "Also comparing deploy applet image"
+        echo "  $THIS_DEPLOY_APPLET_PLUGIN_DIR"
+        echo "  $OTHER_DEPLOY_APPLET_PLUGIN_DIR"
     fi
 
     if [ -d "$OTHER/images" ]; then
--- a/make/CompileJavaModules.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/CompileJavaModules.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -264,10 +264,6 @@
 
 ################################################################################
 
-jdk.jline_COPY := .properties
-
-################################################################################
-
 jdk.jshell_ADD_JAVAC_FLAGS := -Xlint:none
 
 ################################################################################
@@ -376,6 +372,10 @@
 
 ################################################################################
 
+jdk.internal.le_COPY := .properties
+
+################################################################################
+
 jdk.jcmd_COPY := _options
 
 ################################################################################
@@ -515,13 +515,18 @@
 # space separated list.
 JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
 
+# Create an empty directory to set the bootclasspath to.
+EMPTY_BOOTCLASSPATH := $(SUPPORT_OUTPUTDIR)/empty-dir
+$(call MakeDir, $(EMPTY_BOOTCLASSPATH))
+
 # This macro sets up compilation of a module and declares dependencies for it.
 # Param 1 - module name
 define SetupModuleCompilation
   # Find the module dependencies by parsing modules.list file
   $1_DEPS := $$(call FindDepsForModule, $1)
 
-  $1_CLASSPATH := $$(addprefix $(JDK_OUTPUTDIR)/modules/,$$($1_DEPS))
+  $1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
+      $(JDK_OUTPUTDIR)/modules/$$d))
   # When crypto classes are prebuilt, need to look for classes already in
   # output dir.
   ifneq ($(BUILD_CRYPTO), true)
@@ -533,15 +538,15 @@
     $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
   endif
   $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
-  $1_JAVAC_FLAGS := -bootclasspath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
+  $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_BOOTCLASSPATH) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
 
   $$(eval $$(call SetupJavaCompilation,$1, \
       SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
       SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \
-      INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
-      BIN := $(JDK_OUTPUTDIR)/modules/$1, \
+      INCLUDES := $(JDK_USER_DEFINED_FILTER),\
+      BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
       HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
-      ADD_JAVAC_FLAGS := $$($1_JAVAC_FLAGS)))
+      ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
 
   $1: $$($1) $$($1_COPY_EXTRA)
 
@@ -552,7 +557,8 @@
   # Only the javac compilation actually depends on other modules so limit
   # dependency declaration to that by using the *_COMPILE_TARGET variable.
   $$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
-      $$(call SetupJavaCompilationCompileTarget, $$d, $(JDK_OUTPUTDIR)/modules/$$d))
+      $$(call SetupJavaCompilationCompileTarget, $$d, \
+          $$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))
 endef
 
 # Setup compilation for each module
--- a/make/Images.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/Images.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -38,14 +38,15 @@
 ############################################################################
 
 MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
-               jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom
+               jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom \
+               jdk.accessibility
 
 # providers
 PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \
                jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs
 
 # tools
-TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev jdk.javadoc jdk.jcmd jdk.jconsole \
+TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev jdk.internal.le jdk.javadoc jdk.jcmd jdk.jconsole \
                jdk.hotspot.agent jdk.hprof.agent jdk.jartool jdk.jdeps jdk.jdi jdk.jdwp.agent \
                jdk.jshell jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws
 
@@ -57,10 +58,6 @@
   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
@@ -107,6 +104,7 @@
 MODULES_XML += $(SRC_ROOT)/modules.xml
 DEPENDENCIES := $(call CacheFind, \
     $(SUPPORT_OUTPUTDIR)/modules_cmds \
+    $(SUPPORT_OUTPUTDIR)/modules_conf \
     $(SUPPORT_OUTPUTDIR)/modules_libs) \
     $(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \
     $(MODULES_XML)
@@ -455,10 +453,10 @@
 # /sample dir
 
 $(eval $(call SetupCopyFiles,COPY_SAMPLES, \
-    SRC := $(SUPPORT_OUTPUTDIR)/sample, \
+    SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \
     DEST := $(JDK_IMAGE_DIR)/sample, \
-    FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample), \
-        $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample))))
+    FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \
+        $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image))))
 
 JDK_TARGETS += $(COPY_SAMPLES)
 
--- a/make/MacBundles.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/MacBundles.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -25,6 +25,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include TextFileProcessing.gmk
 
 default: bundles
 
@@ -37,9 +38,9 @@
 
   MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
 
-  BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
+    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
   BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
-  BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
+    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
   BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
   BUNDLE_VERSION := $(JDK_VERSION)
   ifeq ($(COMPANY_NAME), N/A)
@@ -56,23 +57,23 @@
 
   # Copy empty directories (jre/lib/applet).
   $(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
 	$(MKDIR) -p $(@D)
 	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
 
   $(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
 	$(MKDIR) -p $(@D)
 	if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
 
   $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
-	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../Home/lib/jli/libjli.dylib $@
 
   $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
-	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(LOG_INFO)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(LN) -s ../Home/lib/jli/libjli.dylib $@
--- a/make/Main.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/Main.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -140,7 +140,7 @@
 define DeclareCompileJavaRecipe
   $1-java:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \
-	    $1 JAVA_MODULES=$1)
+	    $1 JAVA_MODULES=$1 MODULE=$1)
 endef
 
 $(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
@@ -198,13 +198,13 @@
 ################################################################################
 # Build demos and samples targets
 
-demos:
+demos-jdk:
 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
 
-samples:
+samples-jdk:
 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopySamples.gmk)
 
-ALL_TARGETS += demos samples
+ALL_TARGETS += demos-jdk samples-jdk
 
 ################################################################################
 # Image targets
@@ -241,11 +241,11 @@
 profiles:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
 
-mac-bundles:
+mac-bundles-jdk:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
 
 ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \
-    jrtfs-jar jimages profiles mac-bundles
+    jrtfs-jar jimages profiles mac-bundles-jdk
 
 ################################################################################
 # Docs targets
@@ -359,6 +359,8 @@
 
   $(RMIC_TARGETS): interim-langtools interim-corba interim-rmic
 
+  $(JAVA_TARGETS): interim-langtools
+
   import-hotspot: hotspot
 
   $(LIBS_TARGETS): import-hotspot
@@ -368,7 +370,7 @@
   # The demos are currently linking to libjvm and libjava, just like all other
   # jdk libs, even though they don't need to. To avoid warnings, make sure they
   # aren't built until after libjava and libjvm are available to link to.
-  demos: $(JAVA_TARGETS)
+  demos-jdk: $(JAVA_TARGETS)
 
   # Declare dependency from <module>-java to <module>-gensrc
   $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
@@ -428,7 +430,7 @@
 
   profiles: exploded-image strip-binaries source-tips
 
-  mac-bundles: jimages
+  mac-bundles-jdk: jimages
 
   bootcycle-images: jimages
 
@@ -489,9 +491,15 @@
 ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
     $(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
 
+demos: demos-jdk
+
+samples: samples-jdk
+
 # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
 exploded-image: $(ALL_MODULE_TARGETS)
 
+mac-bundles: mac-bundles-jdk
+
 # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
 # and in line with this, our targets for creating these are named *-image[s].
 
@@ -514,8 +522,8 @@
 all-images: product-images test-image docs-image
 
 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
-    jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image \
-    product-images docs-image test-image all-images
+    jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) demos samples exploded-image \
+    mac-bundles product-images docs-image test-image all-images
 
 ################################################################################
 
--- a/make/MainSupport.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/MainSupport.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -65,7 +65,7 @@
 	@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
 	@$(PRINTF) "\n" $(LOG_DEBUG)
 	$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
-	$(RM) -r $(SUPPORT_OUTPUTDIR)/misc/$(strip $1)
+	$(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
 	$(PRINTF) " done\n"
 	$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
 	$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
--- a/make/StripBinaries.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/StripBinaries.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -28,6 +28,9 @@
 include $(SPEC)
 include MakeBase.gmk
 
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, , StripBinaries.gmk))
+
 ################################################################################
 # Copy native libraries and executables to a secondary location to strip them
 # and filter out files that shouldn't go into the image.
@@ -51,19 +54,24 @@
   endef
 endif
 
+NO_STRIP_CMDS_FILTER += %.cgi
+
 # Don't include debug info for executables.
 ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \
     $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l))
-COPY_CMDS_SRC := $(filter %.cgi, $(ALL_CMDS_SRC))
-STRIP_CMDS_SRC := $(filter-out $(COPY_CMDS_SRC), $(ALL_CMDS_SRC))
+COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
+STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
 
-# Make sure symbolic links are copied and not stripped
-COPY_LIBS_SRC := \
-    $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
-        \( ! -name '*$(SHARED_LIBRARY_SUFFIX)' -type f \) -o -type l)
+# OS X stores symbol information in a .dylib file inside a .dSYM directory -
+# that file should not be stripped, so we prune the tree at the .dSYM directory.
+# Example: support/modules_libs/java.base/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib
 STRIP_LIBS_SRC := \
     $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
-        -name '*$(SHARED_LIBRARY_SUFFIX)' -type f)
+        -name '*$(SHARED_LIBRARY_SUFFIX)' -type f -print -o -name "*.dSYM" -prune)
+# Make sure symbolic links are copied and not stripped.
+COPY_LIBS_SRC := \
+    $(filter-out $(STRIP_LIBS_SRC), \
+    $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs -type f -o -type l))
 
 $(eval $(call SetupCopyFiles,STRIP_MODULES_CMDS, \
     SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds, \
--- a/make/common/CORE_PKGS.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/common/CORE_PKGS.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -222,7 +222,6 @@
     javax.swing.plaf.nimbus \
     javax.swing.plaf.synth \
     javax.tools \
-    javax.tools.annotation \
     javax.transaction \
     javax.transaction.xa \
     javax.xml.parsers \
--- a/make/common/JavaCompilation.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/common/JavaCompilation.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -561,10 +561,6 @@
 
     $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
 	$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
-        # As a workaround for sjavac not tracking api changed from the classpath, force full
-        # recompile if an external dependency, which is something other than a source
-        # change, triggered this compilation.
-	$$(if $$(filter-out $$($1_SRCS), $$?), $(FIND) $$(@D) -name "*.class" $(FIND_DELETE))
 	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
 	$(ECHO) Compiling $1
 	($$($1_JVM) $$($1_SJAVAC) \
--- a/make/common/MakeBase.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/common/MakeBase.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -369,8 +369,9 @@
 HGTIP_FILENAME=.hgtip
 HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
 REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
-    $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
-        $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
+    $(shell $(CD) $(SRC_ROOT) ; \
+        $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) \
+            $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) \
         2> /dev/null)))))
 
 # Emit the repo:tip pairs to $@
@@ -754,6 +755,17 @@
     $(call DependOnVariableHelper,$(strip $1),$(strip $2))
 
 ################################################################################
+# Find lib dir for module
+# Param 1 - module name
+ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
+  FindLibDirForModule = \
+      $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
+else
+  FindLibDirForModule = \
+      $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
+endif
+
+################################################################################
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , common/MakeBase.gmk))
--- a/make/common/NativeCompilation.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/common/NativeCompilation.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -449,6 +449,16 @@
     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
   endif
 
+  # If no C++ flags are explicitly set, default to using the C flags.
+  # After that, we can set additional C++ flags that should not interfere
+  # with the mechanism for copying the C flags by default.
+  ifeq ($$($1_CXXFLAGS),)
+    $1_CXXFLAGS:=$$($1_CFLAGS)
+  endif
+  ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
+    $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
+  endif
+
   ifeq ($$($1_DEBUG_SYMBOLS), true)
     ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
       ifdef OPENJDK
@@ -466,16 +476,6 @@
     endif
   endif
 
-  # If no C++ flags are explicitly set, default to using the C flags.
-  # After that, we can set additional C++ flags that should not interfere
-  # with the mechanism for copying the C flags by default.
-  ifeq ($$($1_CXXFLAGS),)
-    $1_CXXFLAGS:=$$($1_CFLAGS)
-  endif
-  ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
-    $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
-  endif
-
   ifneq (,$$($1_REORDER))
     $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
     $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
--- a/make/common/TestFilesCompilation.gmk	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/common/TestFilesCompilation.gmk	Tue Jul 07 13:51:13 2015 +0200
@@ -86,8 +86,8 @@
         OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \
         OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
         LANG := C, \
-        CFLAGS := $$($1_CFLAGS), \
-        LDFLAGS := $$($1_LDFLAGS), \
+        CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
+        LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
         OPTIMIZATION := LOW, \
         DEBUG_SYMBOLS := true)) \
     $$(eval $1 += $$(BUILD_TEST_$$(name)) )  \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createMacosxDevkit.sh	Tue Jul 07 13:51:13 2015 +0200
@@ -0,0 +1,147 @@
+#!/bin/bash
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This script copies part of an Xcode installer into a devkit suitable
+# for building OpenJDK and OracleJDK. The installation .dmg files for Xcode
+# and the aux tools need to be available.
+# erik.joelsson@oracle.com
+
+USAGE="$0 <Xcode.dmg> <XQuartz.dmg> [<auxtools.dmg>]"
+
+if [ "$1" = "" ] || [ "$2" = "" ]; then
+    echo $USAGE
+    exit 1
+fi
+
+XCODE_DMG="$1"
+XQUARTZ_DMG="$2"
+AUXTOOLS_DMG="$3"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+
+# Mount XCODE_DMG
+if [ -e "/Volumes/Xcode" ]; then
+    hdiutil detach /Volumes/Xcode
+fi
+hdiutil attach $XCODE_DMG
+
+# Find the version of Xcode
+XCODE_VERSION="$(/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version \
+    | awk '/Xcode/ { print $2 }' )"
+
+DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-devkit"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Xcode version: $XCODE_VERSION"
+echo "Creating devkit in $DEVKIT_ROOT"
+
+################################################################################
+# Copy files to root
+mkdir -p $DEVKIT_ROOT
+if [ ! -d $DEVKIT_ROOT/Xcode.app ]; then
+    echo "Copying Xcode.app..."
+    cp -RH "/Volumes/Xcode/Xcode.app" $DEVKIT_ROOT/
+fi
+# Trim out some seemingly unneeded parts to save space.
+rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Applications
+rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/iPhone*
+rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Documentation
+rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/share/man
+if [ -e $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk ]; then
+    rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
+    rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/share/man
+fi
+
+hdiutil detach /Volumes/Xcode
+
+################################################################################
+# Copy Freetype into sysroot
+if [ -e "/Volumes/XQuartz-*" ]; then
+    hdiutil detach /Volumes/XQuartz-*
+fi
+hdiutil attach $XQUARTZ_DMG
+
+echo "Copying freetype..."
+rm -rf /tmp/XQuartz
+pkgutil --expand /Volumes/XQuartz-*/XQuartz.pkg /tmp/XQuartz/
+rm -rf /tmp/x11
+mkdir /tmp/x11
+cd /tmp/x11
+cat /tmp/XQuartz-*/x11.pkg/Payload | gunzip -dc |cpio -i
+
+cp -RH opt/X11/include/freetype2 \
+    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/
+cp -RH opt/X11/include/ft2build.h \
+    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/
+cp -RH opt/X11/lib/libfreetype.* \
+    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/
+
+cd -
+
+hdiutil detach /Volumes/XQuartz-*
+
+################################################################################
+# Optionally copy PackageMaker
+
+if [ -e "$AUXTOOLS_DMG" ]; then
+    if [ -e "/Volumes/Auxiliary Tools" ]; then
+        hdiutil detach "/Volumes/Auxiliary Tools"
+    fi
+    hdiutil attach $AUXTOOLS_DMG
+
+    echo "Copying PackageMaker.app..."
+    cp -RH "/Volumes/Auxiliary Tools/PackageMaker.app" $DEVKIT_ROOT/
+
+    hdiutil detach "/Volumes/Auxiliary Tools"
+fi
+
+################################################################################
+# Generate devkit.info
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
+echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
+echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk\""
+echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/PackageMaker.app/Contents/MacOS:\$DEVKIT_TOOLCHAIN_PATH\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle..."
+(cd $DEVKIT_ROOT && tar c - . | gzip - > "$DEVKIT_BUNDLE")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createWindowsDevkit.sh	Tue Jul 07 13:51:13 2015 +0200
@@ -0,0 +1,131 @@
+#!/bin/bash
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This script copies parts of a Visual Studio 2013 installation into a devkit
+# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
+# erik.joelsson@oracle.com
+
+VS_VERSION="2013"
+VS_VERSION_NUM="12.0"
+VS_VERSION_NUM_NODOT="120"
+SDK_VERSION="8.1"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-devkit"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Creating devkit in $DEVKIT_ROOT"
+
+MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcr${VS_VERSION_NUM_NODOT}.dll
+MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
+
+################################################################################
+# Copy Visual Studio files
+
+eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
+VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
+echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/VC ]; then
+    echo "Copying VC..."
+    mkdir -p $DEVKIT_ROOT/VC/bin
+    cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
+    cp    "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
+    cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
+    mkdir -p $DEVKIT_ROOT/VC/lib
+    cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
+    cp    "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
+    cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
+    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
+    cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
+    cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
+    cp    "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
+    mkdir -p $DEVKIT_ROOT/VC/redist
+    cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
+    cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
+    # The redist runtime libs are needed to run the compiler but may not be
+    # installed on the machine where the devkit will be used.
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
+    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
+    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
+fi
+
+################################################################################
+# Copy SDK files
+
+PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
+SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
+echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
+
+if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
+    echo "Copying SDK..."
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
+    cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
+    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
+    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
+    cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
+fi
+
+################################################################################
+# Generate devkit.info
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION (devkit)\""
+echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
+echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
+echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
+echo-info ""
+echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
+echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
+echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
+echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
+echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle: $DEVKIT_BUNDLE"
+(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- a/make/jprt.properties	Tue Jun 02 09:17:20 2015 +0200
+++ b/make/jprt.properties	Tue Jul 07 13:51:13 2015 +0200
@@ -123,11 +123,11 @@
     ${my.i586.default.build.configure.args}				\
     ${jprt.productOpen.build.configure.args}
 
-jprt.windows_i586_6.2.build.configure.args=                             \
-    --with-toolchain-version=2013                                       \
+jprt.windows_i586.build.configure.args= \
+    --with-devkit=$VS2013_HOME \
     ${jprt.i586.build.configure.args}
-jprt.windows_x64_6.2.build.configure.args=                              \
-    --with-toolchain-version=2013
+jprt.windows_x64.build.configure.args= \
+    --with-devkit=$VS2013_HOME
 
 ########
 #
@@ -282,13 +282,11 @@
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_CMS,		\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_G1,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParOldGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_default_nontiered,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_SerialGC,		\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_ParallelGC,		\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_CMS,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_G1,			\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_ParOldGC
+    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_G1
 
 my.test.targets.hotspot.solaris.x64=					\
     solaris_x64_5.11-{product|fastdebug}-c2-jvm98,			\
@@ -301,7 +299,6 @@
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_CMS,		\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1,		\
-    solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParOldGC,		\
     solaris_x64_5.11-{product|fastdebug}-c2-jbb_default_nontiered,	\
     solaris_x64_5.11-{product|fastdebug}-c2-jbb_SerialGC,		\
     solaris_x64_5.11-{product|fastdebug}-c2-jbb_ParallelGC,
@@ -319,13 +316,11 @@
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_G1,		\
-    linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC,	\
     linux_i586_2.6-{product|fastdebug}-c1-jbb_SerialGC,			\
     linux_i586_2.6-{product|fastdebug}-c2-jbb_default_nontiered,	\
     linux_i586_2.6-{product|fastdebug}-c1-jbb_ParallelGC,		\
     linux_i586_2.6-{product|fastdebug}-c1-jbb_CMS,			\
-    linux_i586_2.6-{product|fastdebug}-c1-jbb_G1,			\
-    linux_i586_2.6-{product|fastdebug}-c1-jbb_ParOldGC
+    linux_i586_2.6-{product|fastdebug}-c1-jbb_G1
 
 my.test.targets.hotspot.linux.x64=					\
     linux_x64_2.6-{product|fastdebug}-c2-jvm98,				\
@@ -335,11 +330,9 @@
     linux_x64_2.6-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     linux_x64_2.6-{product|fastdebug}-c2-GCBasher_CMS,			\
     linux_x64_2.6-{product|fastdebug}-c2-GCBasher_G1,			\
-    linux_x64_2.6-{product|fastdebug}-c2-GCBasher_ParOldGC,		\
     linux_x64_2.6-{product|fastdebug}-c2-jbb_default_nontiered,		\
     linux_x64_2.6-{product|fastdebug}-c2-jbb_ParallelGC,		\
-    linux_x64_2.6-{product|fastdebug}-c2-jbb_G1,			\
-    linux_x64_2.6-{product|fastdebug}-c2-jbb_ParOldGC
+    linux_x64_2.6-{product|fastdebug}-c2-jbb_G1
 
 my.test.targets.hotspot.macosx.x64=					\
     macosx_x64_10.9-{product|fastdebug}-c2-jvm98,			\
@@ -349,11 +342,9 @@
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_CMS,		\
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1,			\
-    macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_ParOldGC,		\
     macosx_x64_10.9-{product|fastdebug}-c2-jbb_default_nontiered,	\
     macosx_x64_10.9-{product|fastdebug}-c2-jbb_ParallelGC,		\
-    macosx_x64_10.9-{product|fastdebug}-c2-jbb_G1,			\
-    macosx_x64_10.9-{product|fastdebug}-c2-jbb_ParOldGC
+    macosx_x64_10.9-{product|fastdebug}-c2-jbb_G1
 
 my.test.targets.hotspot.windows.i586=					\
     windows_i586_6.2-{product|fastdebug}-{c1|c2}-jvm98,			\
@@ -367,13 +358,11 @@
     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
+    windows_i586_6.2-product-{c1|c2}-jbb_G1
 
 my.test.targets.hotspot.windows.x64=					\
     windows_x64_6.2-{product|fastdebug}-c2-jvm98,			\
@@ -386,13 +375,11 @@
     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
+    windows_x64_6.2-product-c2-jbb_G1
 
 # Some basic "smoke" tests for OpenJDK builds
 my.test.targets.hotspot.open=						\
--- a/modules.xml	Tue Jun 02 09:17:20 2015 +0200
+++ b/modules.xml	Tue Jul 07 13:51:13 2015 +0200
@@ -769,28 +769,6 @@
     </export>
   </module>
   <module>
-    <name>jdk.jline</name>
-    <depend>java.base</depend>
-    <depend>java.desktop</depend> <!--unnecessary???-->
-    <depend>java.datatransfer</depend> <!--for jline -->
-    <export>
-      <name>jdk.internal.jline</name>
-      <to>jdk.jshell</to>
-    </export>
-    <export>
-      <name>jdk.internal.jline.console</name>
-      <to>jdk.jshell</to>
-    </export>
-    <export>
-      <name>jdk.internal.jline.console.completer</name>
-      <to>jdk.jshell</to>
-    </export>
-    <export>
-      <name>jdk.internal.jline.console.history</name>
-      <to>jdk.jshell</to>
-    </export>
-  </module>
-  <module>
     <name>jdk.jshell</name>
     <depend>java.base</depend>
     <depend re-exports="true">java.compiler</depend> <!-- reexport for Diagnostic! -->
@@ -799,7 +777,7 @@
     <depend>java.datatransfer</depend> <!--for jline -->
     <depend>java.prefs</depend>
     <depend>jdk.jdi</depend>
-    <depend>jdk.jline</depend>
+    <depend>jdk.internal.le</depend>
     <export>
       <name>jdk.jshell</name>
     </export>
@@ -1672,6 +1650,30 @@
     </export>
   </module>
   <module>
+    <name>jdk.internal.le</name>
+    <depend>java.base</depend>
+    <export>
+      <name>jdk.internal.jline</name>
+      <to>jdk.scripting.nashorn.shell</to>
+      <to>jdk.jshell</to>
+    </export>
+    <export>
+      <name>jdk.internal.jline.console</name>
+      <to>jdk.scripting.nashorn.shell</to>
+      <to>jdk.jshell</to>
+    </export>
+    <export>
+      <name>jdk.internal.jline.console.completer</name>
+      <to>jdk.scripting.nashorn.shell</to>
+      <to>jdk.jshell</to>
+    </export>
+    <export>
+      <name>jdk.internal.jline.console.history</name>
+      <to>jdk.scripting.nashorn.shell</to>
+      <to>jdk.jshell</to>
+    </export>
+  </module>
+  <module>
     <name>jdk.jartool</name>
     <depend>java.base</depend>
     <export>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib-test/jdk/test/lib/apps/LingeredAppTest.java	Tue Jul 07 13:51:13 2015 +0200
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary Unit test for LingeredApp
+ * @compile LingeredAppTest.java
+ * @compile LingeredApp.java
+ * @run main LingeredAppTest
+ */
+
+package jdk.test.lib.apps;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+public class LingeredAppTest {
+
+    public static void main(String[] args) {
+        try {
+            System.out.println("Starting LingeredApp with default parameters");
+
+            ArrayList<String> cmd = new ArrayList<String>();
+
+            // Propagate test.vm.options to LingeredApp, filter out possible empty options
+            String testVmOpts[] = System.getProperty("test.vm.opts","").split("\\s+");
+            for (String s : testVmOpts) {
+                if (!s.equals("")) {
+                    cmd.add(s);
+                }
+            }
+
+            cmd.add("-XX:+PrintFlagsFinal");
+
+            LingeredApp a = LingeredApp.startApp(cmd);
+            System.out.printf("App pid: %d\n", a.getPid());
+            a.stopApp();
+
+            System.out.println("App output:");
+            int count = 0;
+            for (String line : a.getAppOutput()) {
+                count += 1;
+            }
+            System.out.println("Found " + count + " lines in VM output");
+            System.out.println("Test PASSED");
+        } catch (IOException ex) {
+            ex.printStackTrace();
+            System.out.println("Test ERROR");
+            System.exit(3);
+        }
+    }
+}
--- a/test/lib/Makefile	Tue Jun 02 09:17:20 2015 +0200
+++ b/test/lib/Makefile	Tue Jul 07 13:51:13 2015 +0200
@@ -42,7 +42,8 @@
 JAR = $(JDK_HOME)/bin/jar
 
 WB_SRC_FILES = $(shell find $(SRC_DIR)/sun/hotspot -name '*.java')
-SHARE_SRC_FILES = $(shell find $(SRC_DIR)/share/classes -name '*.java')
+# test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
+SHARE_SRC_FILES = $(shell find $(SRC_DIR)/share/classes/jdk/test/lib/hprof -name '*.java')
 
 .PHONY: wb.filelist share.filelist clean cleantmp
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/apps/LingeredApp.java	Tue Jul 07 13:51:13 2015 +0200
@@ -0,0 +1,442 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.apps;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.nio.file.attribute.FileTime;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * This is a framework to launch an app that could be synchronized with caller
+ * to make further attach actions reliable across supported platforms
+
+ * Caller example:
+ *   SmartTestApp a = SmartTestApp.startApp(cmd);
+ *     // do something
+ *   a.stopApp();
+ *
+ *   or fine grained control
+ *
+ *   a = new SmartTestApp("MyLock.lck");
+ *   a.createLock();
+ *   a.runApp();
+ *   a.waitAppReady();
+ *     // do something
+ *   a.deleteLock();
+ *   a.waitAppTerminate();
+ *
+ *  Then you can work with app output and process object
+ *
+ *   output = a.getAppOutput();
+ *   process = a.getProcess();
+ *
+ */
+public class LingeredApp {
+
+    private static final long spinDelay = 1000;
+
+    private final String lockFileName;
+    private long lockCreationTime;
+    private Process appProcess;
+    private final ArrayList<String> storedAppOutput;
+
+    /*
+     * Drain child process output, store it into string array
+     */
+    class InputGobbler extends Thread {
+
+        InputStream is;
+        List<String> astr;
+
+        InputGobbler(InputStream is, List<String> astr) {
+            this.is = is;
+            this.astr = astr;
+        }
+
+        public void run() {
+            try {
+                InputStreamReader isr = new InputStreamReader(is);
+                BufferedReader br = new BufferedReader(isr);
+                String line = null;
+                while ((line = br.readLine()) != null) {
+                    astr.add(line);
+                }
+            } catch (IOException ex) {
+                // pass
+            }
+        }
+    }
+
+    /**
+     * Create LingeredApp object on caller side. Lock file have be a valid filename
+     * at writable location
+     *
+     * @param lockFileName - the name of lock file
+     */
+    public LingeredApp(String lockFileName) {
+        this.lockFileName = lockFileName;
+        this.storedAppOutput = new ArrayList<String>();
+    }
+
+    /**
+     *
+     * @return name of lock file
+     */
+    public String getLockFileName() {
+        return this.lockFileName;
+    }
+
+    /**
+     *
+     * @return name of testapp
+     */
+    public String getAppName() {
+        return this.getClass().getName();
+    }
+
+    /**
+     *
+     *  @return pid of java process running testapp
+     */
+    public long getPid() {
+        if (appProcess == null) {
+            throw new RuntimeException("Process is not alive");
+        }
+        return appProcess.getPid();
+    }
+
+    /**
+     *
+     * @return process object
+     */
+    public Process getProcess() {
+        return appProcess;
+    }
+
+    /**
+     *
+     * @return application output as string array. Empty array if application produced no output
+     */
+    public List<String> getAppOutput() {
+        if (appProcess.isAlive()) {
+            throw new RuntimeException("Process is still alive. Can't get its output.");
+        }
+        return storedAppOutput;
+    }
+
+    /* Make sure all part of the app use the same method to get dates,
+     as different methods could produce different results
+     */
+    private static long epoch() {
+        return new Date().getTime();
+    }
+
+    private static long lastModified(String fileName) throws IOException {
+        Path path = Paths.get(fileName);
+        BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);
+        return attr.lastModifiedTime().toMillis();
+    }
+
+    private static void setLastModified(String fileName, long newTime) throws IOException {
+        Path path = Paths.get(fileName);
+        FileTime fileTime = FileTime.fromMillis(newTime);
+        Files.setLastModifiedTime(path, fileTime);
+    }
+
+    /**
+     * create lock
+     *
+     * @throws IOException
+     */
+    public void createLock() throws IOException {
+        Path path = Paths.get(lockFileName);
+        // Files.deleteIfExists(path);
+        Files.createFile(path);
+        lockCreationTime = lastModified(lockFileName);
+    }
+
+    /**
+     * Delete lock
+     *
+     * @throws IOException
+     */
+    public void deleteLock() throws IOException {
+        try {
+            Path path = Paths.get(lockFileName);
+            Files.delete(path);
+        } catch (NoSuchFileException ex) {
+            // Lock already deleted. Ignore error
+        }
+    }
+
+    public void waitAppTerminate() {
+        while (true) {
+            try {
+                appProcess.waitFor();
+                break;
+            } catch (InterruptedException ex) {
+                // pass
+            }
+        }
+    }
+
+    /**
+     * The app touches the lock file when it's started
+     * wait while it happens. Caller have to delete lock on wait error.
+     *
+     * @param timeout
+     * @throws java.io.IOException
+     */
+    public void waitAppReady(long timeout) throws IOException {
+        long here = epoch();
+        while (true) {
+            long epoch = epoch();
+            if (epoch - here > (timeout * 1000)) {
+                throw new IOException("App waiting timeout");
+            }
+
+            // Live process should touch lock file every second
+            long lm = lastModified(lockFileName);
+            if (lm > lockCreationTime) {
+                break;
+            }
+
+            // Make sure process didn't already exit
+            if (!appProcess.isAlive()) {
+                throw new IOException("App exited unexpectedly with " + appProcess.exitValue());
+            }
+
+            try {
+                Thread.sleep(spinDelay);
+            } catch (InterruptedException ex) {
+                // pass
+            }
+        }
+    }
+
+    /**
+     * Run the app
+     *
+     * @param vmArguments
+     * @throws IOException
+     */
+    public void runApp(List<String> vmArguments)
+            throws IOException {
+
+        // We should always use testjava or throw an exception,
+        // so we can't use JDKToolFinder.getJDKTool("java");
+        // that falls back to compile java on error
+        String jdkPath = System.getProperty("test.jdk");
+        if (jdkPath == null) {
+            // we are not under jtreg, try env
+            Map<String, String> env = System.getenv();
+            jdkPath = env.get("TESTJAVA");
+        }
+
+        if (jdkPath == null) {
+            throw new RuntimeException("Can't determine jdk path neither test.jdk property no TESTJAVA env are set");
+        }
+
+        String osname = System.getProperty("os.name");
+        String javapath = jdkPath + ((osname.startsWith("window")) ? "/bin/java.exe" : "/bin/java");
+
+        List<String> cmd = new ArrayList<String>();
+        cmd.add(javapath);
+
+
+        if (vmArguments == null) {
+            // Propagate test.vm.options to LingeredApp, filter out possible empty options
+            String testVmOpts[] = System.getProperty("test.vm.opts","").split("\\s+");
+            for (String s : testVmOpts) {
+                if (!s.equals("")) {
+                    cmd.add(s);
+                }
+            }
+        }
+        else{
+            // Lets user manage LingeredApp options
+            cmd.addAll(vmArguments);
+        }
+
+        // Make sure we set correct classpath to run the app
+        cmd.add("-cp");
+        String classpath = System.getProperty("test.class.path");
+        cmd.add((classpath == null) ? "." : classpath);
+
+        cmd.add(this.getAppName());
+        cmd.add(lockFileName);
+
+        // Reporting
+        StringBuilder cmdLine = new StringBuilder();
+        for (String strCmd : cmd) {
+            cmdLine.append("'").append(strCmd).append("' ");
+        }
+
+        // A bit of verbosity
+        System.out.println("Command line: [" + cmdLine.toString() + "]");
+
+        ProcessBuilder pb = new ProcessBuilder(cmd);
+        // we don't expect any error output but make sure we are not stuck on pipe
+        // pb.redirectErrorStream(false);
+        pb.redirectError(ProcessBuilder.Redirect.INHERIT);
+
+        appProcess = pb.start();
+
+        // Create pipe reader for process, and read stdin and stderr to array of strings
+        InputGobbler gb = new InputGobbler(appProcess.getInputStream(), storedAppOutput);
+        gb.start();
+    }
+
+    /**
+     * Delete lock file that signals app to terminate, then
+     * wait until app is actually terminated.
+     * @throws IOException
+     */
+    public void stopApp() throws IOException {
+        deleteLock();
+        waitAppTerminate();
+        int exitcode = appProcess.exitValue();
+        if (exitcode != 0) {
+            throw new IOException("LingeredApp terminated with non-zero exit code " + exitcode);
+        }
+    }
+
+    /**
+     *  High level interface for test writers
+     */
+    /**
+     * Factory method that creates SmartAppTest object with ready to use application
+     * lock name is autogenerated, wait timeout is hardcoded
+     * @param cmd - vm options, could be null to auto add testvm.options
+     * @return LingeredApp object
+     * @throws IOException
+     */
+    public static LingeredApp startApp(List<String> cmd) throws IOException {
+        final String lockName = UUID.randomUUID().toString() + ".lck";
+        final int waitTime = 10;
+
+        LingeredApp a = new LingeredApp(lockName);
+        a.createLock();
+        try {
+            a.runApp(cmd);
+            a.waitAppReady(waitTime);
+        } catch (Exception ex) {
+            a.deleteLock();
+            throw ex;
+        }
+
+        return a;
+    }
+
+    public static LingeredApp startApp() throws IOException {
+        return startApp(null);
+    }
+
+    public static void stopApp(LingeredApp app) throws IOException {
+        if (app != null) {
+            // LingeredApp can throw an exception during the intialization,
+            // make sure we don't have cascade NPE
+            app.stopApp();
+        }
+    }
+
+    /**
+     * LastModified time might not work correctly in some cases it might
+     * cause later failures
+     */
+
+    public static boolean isLastModifiedWorking() {
+        boolean sane = true;
+        try {
+            long lm = lastModified(".");
+            if (lm == 0) {
+                System.err.println("SANITY Warning! The lastModifiedTime() doesn't work on this system, it returns 0");
+                sane = false;
+            }
+
+            long now = epoch();
+            if (lm > now) {
+                System.err.println("SANITY Warning! The Clock is wrong on this system lastModifiedTime() > getTime()");
+                sane = false;
+            }
+
+            setLastModified(".", epoch());
+            long lm1 = lastModified(".");
+            if (lm1 <= lm) {
+                System.err.println("SANITY Warning! The setLastModified doesn't work on this system");
+                sane = false;
+            }
+        }
+        catch(IOException e) {
+            System.err.println("SANITY Warning! IOException during sanity check " + e);
+            sane = false;
+        }
+
+        return sane;
+    }
+
+    /**
+     * This part is the application it self
+     */
+    public static void main(String args[]) {
+
+        if (args.length != 1) {
+            System.err.println("Lock file name is not specified");
+            System.exit(7);
+        }
+
+        String theLockFileName = args[0];
+
+        try {
+            Path path = Paths.get(theLockFileName);
+
+            while (Files.exists(path)) {
+                // Touch the lock to indicate our readiness
+                setLastModified(theLockFileName, epoch());
+                Thread.sleep(spinDelay);
+            }
+        } catch (NoSuchFileException ex) {
+            // Lock deleted while we are setting last modified time.
+            // Ignore error and lets the app exits
+        } catch (Exception ex) {
+            System.err.println("LingeredApp ERROR: " + ex);
+            // Leave exit_code = 1 to Java launcher
+            System.exit(3);
+        }
+
+        System.exit(0);
+    }
+}
--- a/test/lib/sun/hotspot/WhiteBox.java	Tue Jun 02 09:17:20 2015 +0200
+++ b/test/lib/sun/hotspot/WhiteBox.java	Tue Jul 07 13:51:13 2015 +0200
@@ -83,6 +83,7 @@
 
   public native int  getHeapOopSize();
   public native int  getVMPageSize();
+  public native long getVMAllocationGranularity();
   public native long getVMLargePageSize();
 
   private native boolean isObjectInOldGen0(Object o);
@@ -306,6 +307,8 @@
   public native boolean isConstantVMFlag(String name);
   public native boolean isLockedVMFlag(String name);
   public native void    setBooleanVMFlag(String name, boolean value);
+  public native void    setIntVMFlag(String name, long value);
+  public native void    setUintVMFlag(String name, long value);
   public native void    setIntxVMFlag(String name, long value);
   public native void    setUintxVMFlag(String name, long value);
   public native void    setUint64VMFlag(String name, long value);
@@ -313,6 +316,8 @@
   public native void    setStringVMFlag(String name, String value);
   public native void    setDoubleVMFlag(String name, double value);
   public native Boolean getBooleanVMFlag(String name);
+  public native Long    getIntVMFlag(String name);
+  public native Long    getUintVMFlag(String name);
   public native Long    getIntxVMFlag(String name);
   public native Long    getUintxVMFlag(String name);
   public native Long    getUint64VMFlag(String name);
@@ -320,9 +325,9 @@
   public native String  getStringVMFlag(String name);
   public native Double  getDoubleVMFlag(String name);
   private final List<Function<String,Object>> flagsGetters = Arrays.asList(
-    this::getBooleanVMFlag, this::getIntxVMFlag, this::getUintxVMFlag,
-    this::getUint64VMFlag, this::getSizeTVMFlag, this::getStringVMFlag,
-    this::getDoubleVMFlag);
+    this::getBooleanVMFlag, this::getIntVMFlag, this::getUintVMFlag,
+    this::getIntxVMFlag, this::getUintxVMFlag, this::getUint64VMFlag,
+    this::getSizeTVMFlag, this::getStringVMFlag, this::getDoubleVMFlag);
 
   public Object getVMFlag(String name) {
     return flagsGetters.stream()
@@ -359,4 +364,8 @@
 
   // Safepoint Checking
   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
+
+  // Sharing
+  public native boolean isShared(Object o);
+  public native boolean areSharedStringsIgnored();
 }