Merge
authorduke
Wed, 05 Jul 2017 21:29:18 +0200
changeset 36619 62e4bc80b101
parent 36618 5531985950c0 (current diff)
parent 36546 fb6c19577a6a (diff)
child 36682 5203b786299e
Merge
--- a/.hgtags-top-repo	Wed Mar 23 21:44:35 2016 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 21:29:18 2017 +0200
@@ -353,3 +353,4 @@
 c7be2a78c31b3b6132f2f5e9e4b3d3bb1c20245c jdk-9+108
 1787bdaabb2b6f4193406e25a50cb0419ea8e8f3 jdk-9+109
 925be13b3740d07a5958ccb5ab3c0ae1baba7055 jdk-9+110
+f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111
--- a/common/autoconf/flags.m4	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/autoconf/flags.m4	Wed Jul 05 21:29:18 2017 +0200
@@ -427,6 +427,9 @@
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
     CFLAGS_DEBUG_SYMBOLS="-g"
     CXXFLAGS_DEBUG_SYMBOLS="-g"
+  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+    CFLAGS_DEBUG_SYMBOLS="-Zi"
+    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
   fi
   AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
   AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
@@ -585,6 +588,12 @@
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
+  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+    CXXSTD_CXXFLAG="-std=gnu++98"
+    FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
+    						 IF_FALSE: [CXXSTD_CXXFLAG=""])
+    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
+    AC_SUBST([CXXSTD_CXXFLAG])
   fi
 
   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
@@ -622,6 +631,7 @@
         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
         ;;
     esac
+    TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS)
   elif test "x$TOOLCHAIN_TYPE" = xclang; then
     if test "x$OPENJDK_TARGET_OS" = xlinux; then
       if test "x$OPENJDK_TARGET_CPU" = xx86; then
@@ -654,7 +664,7 @@
     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
-        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+        -MD -Zc:wchar_t- -W3 -wd4800 \
         -DWIN32_LEAN_AND_MEAN \
         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
@@ -821,9 +831,6 @@
       LDFLAGS_SAFESH="-safeseh"
       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
     fi
-    # TODO: make -debug optional "--disable-full-debug-symbols"
-    LDFLAGS_MICROSOFT_DEBUG="-debug"
-    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
     # If this is a --hash-style=gnu system, use --hash-style=both, why?
     # We have previously set HAS_GNU_HASH if this is the case
@@ -950,14 +957,14 @@
   AC_SUBST(LDFLAGS_TESTEXE)
 ])
 
-# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
-#                                   IF_FALSE: [RUN-IF-FALSE])
+# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                  IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
-# Check that the c and c++ compilers support an argument
-BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
+# Check that the C compiler supports an argument
+BASIC_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
     [*ARGUMENT IF_TRUE IF_FALSE], [$@],
 [
-  AC_MSG_CHECKING([if compiler supports "ARG_ARGUMENT"])
+  AC_MSG_CHECKING([if the C compiler supports "ARG_ARGUMENT"])
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -968,6 +975,26 @@
   AC_LANG_POP([C])
   CFLAGS="$saved_cflags"
 
+  AC_MSG_RESULT([$supports])
+  if test "x$supports" = "xyes" ; then
+    :
+    ARG_IF_TRUE
+  else
+    :
+    ARG_IF_FALSE
+  fi
+])
+
+# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                    IF_FALSE: [RUN-IF-FALSE])
+# ------------------------------------------------------------
+# Check that the C++ compiler supports an argument
+BASIC_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
+    [*ARGUMENT IF_TRUE IF_FALSE], [$@],
+[
+  AC_MSG_CHECKING([if the C++ compiler supports "ARG_ARGUMENT"])
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG ARG_ARGUMENT"
   AC_LANG_PUSH([C++])
@@ -986,6 +1013,34 @@
   fi
 ])
 
+# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                IF_FALSE: [RUN-IF-FALSE])
+# ------------------------------------------------------------
+# Check that the C and C++ compilers support an argument
+BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
+    [*ARGUMENT IF_TRUE IF_FALSE], [$@],
+[
+  FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
+  					     IF_TRUE: [C_COMP_SUPPORTS="yes"],
+					     IF_FALSE: [C_COMP_SUPPORTS="no"])
+  FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
+  					       IF_TRUE: [CXX_COMP_SUPPORTS="yes"],
+					       IF_FALSE: [CXX_COMP_SUPPORTS="no"])
+
+  AC_MSG_CHECKING([if both compilers support "ARG_ARGUMENT"])
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+  
+  AC_MSG_RESULT([$supports])
+  if test "x$supports" = "xyes" ; then
+    :
+    ARG_IF_TRUE
+  else
+    :
+    ARG_IF_FALSE
+  fi
+])
+
 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
 #                                   IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
@@ -1110,3 +1165,20 @@
   AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
   AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
 ])
+
+AC_DEFUN_ONCE([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
+[
+  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
+  # runs afoul of the more aggressive versions of these optimisations.
+  # Notably, value range propagation now assumes that the this pointer of C++
+  # member functions is non-null.
+  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
+  FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_NULL_POINTER_CHECK_CFLAG -Werror],
+  					     IF_FALSE: [NO_NULL_POINTER_CHECK_CFLAG=""])
+  AC_SUBST([NO_NULL_POINTER_CHECK_CFLAG])
+  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
+  FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
+  					     IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
+  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
+  AC_SUBST([NO_LIFETIME_DSE_CFLAG])
+])
--- a/common/autoconf/generated-configure.sh	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 21:29:18 2017 +0200
@@ -723,6 +723,9 @@
 CFLAGS_JDKEXE
 CFLAGS_JDKLIB
 MACOSX_VERSION_MIN
+NO_LIFETIME_DSE_CFLAG
+NO_NULL_POINTER_CHECK_CFLAG
+CXXSTD_CXXFLAG
 CXX_O_FLAG_NONE
 CXX_O_FLAG_DEBUG
 CXX_O_FLAG_NORM
@@ -3966,10 +3969,26 @@
 
 
 
+# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                  IF_FALSE: [RUN-IF-FALSE])
+# ------------------------------------------------------------
+# Check that the C compiler supports an argument
+
+
+
+
+# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
+#                                    IF_FALSE: [RUN-IF-FALSE])
+# ------------------------------------------------------------
+# Check that the C++ compiler supports an argument
+
+
+
+
 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
-#                                   IF_FALSE: [RUN-IF-FALSE])
+#                                IF_FALSE: [RUN-IF-FALSE])
 # ------------------------------------------------------------
-# Check that the c and c++ compilers support an argument
+# Check that the C and C++ compilers support an argument
 
 
 
@@ -3984,6 +4003,8 @@
 
 
 
+
+
 #
 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4929,7 +4950,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1458008154
+DATE_WHEN_GENERATED=1458755892
 
 ###############################################################################
 #
@@ -32806,7 +32827,7 @@
     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
         $SED -e 's/ *Copyright .*//'`
     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
-        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
+        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
     # clang --version output typically looks like
     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
@@ -34103,7 +34124,7 @@
     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
         $SED -e 's/ *Copyright .*//'`
     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
-        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
+        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
     # clang --version output typically looks like
     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
@@ -34472,11 +34493,11 @@
   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
 
   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
-    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
+    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
   fi
 
   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
-    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
+    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
   fi
 
   # Version comparison method inspired by http://stackoverflow.com/a/24067243
@@ -46251,8 +46272,57 @@
 
     # Execute function body
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
-$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
+$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -46281,6 +46351,80 @@
 
   CFLAGS="$saved_cflags"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
   ac_ext=cpp
@@ -46311,6 +46455,33 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
+$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
     HAS_CFLAG_OPTIMIZE_DEBUG=true
   else
     :
@@ -46323,12 +46494,6 @@
 
 
 
-
-
-
-
-
-
     # "-z relro" supported in GNU binutils 2.17 and later
     LINKER_RELRO_FLAG="-Wl,-z,relro"
 
@@ -47868,6 +48033,9 @@
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
     CFLAGS_DEBUG_SYMBOLS="-g"
     CXXFLAGS_DEBUG_SYMBOLS="-g"
+  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+    CFLAGS_DEBUG_SYMBOLS="-Zi"
+    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
   fi
 
 
@@ -47933,8 +48101,57 @@
 
     # Execute function body
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
-$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
+$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -47963,6 +48180,80 @@
 
   CFLAGS="$saved_cflags"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
   ac_ext=cpp
@@ -47993,6 +48284,33 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
+$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
 
   else
     :
@@ -48005,12 +48323,6 @@
 
 
 
-
-
-
-
-
-
       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       ;;
@@ -48144,6 +48456,105 @@
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
+  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+    CXXSTD_CXXFLAG="-std=gnu++98"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
+  supports=yes
+
+  saved_cxxflags="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
+  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
+    :
+    CXXSTD_CXXFLAG=""
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
+
   fi
 
   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
@@ -48181,6 +48592,624 @@
         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
         ;;
     esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  # Need to assign to a variable since m4 is blocked from modifying parts in [].
+  REFERENCE_VERSION=6
+
+  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
+    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
+  fi
+
+  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
+    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
+  fi
+
+  # Version comparison method inspired by http://stackoverflow.com/a/24067243
+  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
+
+  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
+    :
+
+  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
+  # runs afoul of the more aggressive versions of these optimisations.
+  # Notably, value range propagation now assumes that the this pointer of C++
+  # member functions is non-null.
+  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
+$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
+  supports=yes
+
+  saved_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
+  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"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
+  supports=yes
+
+  saved_cxxflags="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
+  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
+    :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
+$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+
+  else
+    :
+    NO_NULL_POINTER_CHECK_CFLAG=""
+  fi
+
+
+
+
+
+
+
+  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
+$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
+  supports=yes
+
+  saved_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
+  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"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
+  supports=yes
+
+  saved_cxxflags="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
+  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
+    :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
+$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+
+  else
+    :
+    NO_LIFETIME_DSE_CFLAG=""
+  fi
+
+
+
+
+
+
+  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
+
+
+
+  else
+    :
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
   elif test "x$TOOLCHAIN_TYPE" = xclang; then
     if test "x$OPENJDK_TARGET_OS" = xlinux; then
       if test "x$OPENJDK_TARGET_CPU" = xx86; then
@@ -48213,7 +49242,7 @@
     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
-        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+        -MD -Zc:wchar_t- -W3 -wd4800 \
         -DWIN32_LEAN_AND_MEAN \
         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
@@ -48380,9 +49409,6 @@
       LDFLAGS_SAFESH="-safeseh"
       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
     fi
-    # TODO: make -debug optional "--disable-full-debug-symbols"
-    LDFLAGS_MICROSOFT_DEBUG="-debug"
-    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
     # If this is a --hash-style=gnu system, use --hash-style=both, why?
     # We have previously set HAS_GNU_HASH if this is the case
@@ -48562,8 +49588,57 @@
 
     # Execute function body
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
-$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
+$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -48592,6 +49667,80 @@
 
   CFLAGS="$saved_cflags"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
   ac_ext=cpp
@@ -48622,6 +49771,33 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
+$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
 
   else
     :
@@ -48635,12 +49811,6 @@
 
 
 
-
-
-
-
-
-
   # Check that the compiler supports -mX (or -qX on AIX) flags
   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
 
@@ -48692,8 +49862,57 @@
 
     # Execute function body
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
-$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
+$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -48722,6 +49941,80 @@
 
   CFLAGS="$saved_cflags"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
   ac_ext=cpp
@@ -48752,6 +50045,33 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
+$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
   else
     :
@@ -48765,12 +50085,6 @@
 
 
 
-
-
-
-
-
-
   # Check whether --enable-warnings-as-errors was given.
 if test "${enable_warnings_as_errors+set}" = set; then :
   enableval=$enable_warnings_as_errors;
@@ -48865,8 +50179,57 @@
 
     # Execute function body
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
-$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -48895,6 +50258,80 @@
 
   CFLAGS="$saved_cflags"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
   ac_ext=cpp
@@ -48925,6 +50362,33 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
     GCC_CAN_DISABLE_WARNINGS=true
   else
     :
@@ -48937,12 +50401,6 @@
 
 
 
-
-
-
-
-
-
       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
         DISABLE_WARNING_PREFIX="-Wno-"
       else
@@ -49001,8 +50459,57 @@
 
     # Execute function body
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
-$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
   supports=yes
 
   saved_cflags="$CFLAGS"
@@ -49031,6 +50538,80 @@
 
   CFLAGS="$saved_cflags"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+    C_COMP_SUPPORTS="yes"
+  else
+    :
+    C_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # Execute function body
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+  supports=yes
+
   saved_cxxflags="$CXXFLAGS"
   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
   ac_ext=cpp
@@ -49061,6 +50642,33 @@
 $as_echo "$supports" >&6; }
   if test "x$supports" = "xyes" ; then
     :
+    CXX_COMP_SUPPORTS="yes"
+  else
+    :
+    CXX_COMP_SUPPORTS="no"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+  supports=no
+  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
     BUILD_CC_CAN_DISABLE_WARNINGS=true
   else
     :
@@ -49073,12 +50681,6 @@
 
 
 
-
-
-
-
-
-
       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
       else
@@ -60105,10 +61707,10 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
 $as_echo_n "checking for which zlib to use... " >&6; }
 
-  DEFAULT_ZLIB=bundled
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    # On macosx default is system...on others default is bundled
-    DEFAULT_ZLIB=system
+  DEFAULT_ZLIB=system
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    # On windows default is bundled...on others default is system
+    DEFAULT_ZLIB=bundled
   fi
 
   if test "x${ZLIB_FOUND}" != "xyes"; then
--- a/common/autoconf/hotspot-spec.gmk.in	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/autoconf/hotspot-spec.gmk.in	Wed Jul 05 21:29:18 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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
@@ -110,7 +110,8 @@
 MT:=@HOTSPOT_MT@
 RC:=@HOTSPOT_RC@
 
-EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE)
+EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE) $(NO_NULL_POINTER_CHECK_FLAG) \
+				   $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
 EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE)
 EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
 
--- a/common/autoconf/lib-bundled.m4	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/autoconf/lib-bundled.m4	Wed Jul 05 21:29:18 2017 +0200
@@ -157,10 +157,10 @@
 
   AC_MSG_CHECKING([for which zlib to use])
 
-  DEFAULT_ZLIB=bundled
-  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    # On macosx default is system...on others default is bundled
-    DEFAULT_ZLIB=system
+  DEFAULT_ZLIB=system
+  if test "x$OPENJDK_TARGET_OS" = xwindows; then
+    # On windows default is bundled...on others default is system
+    DEFAULT_ZLIB=bundled
   fi
 
   if test "x${ZLIB_FOUND}" != "xyes"; then
--- a/common/autoconf/spec.gmk.in	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/autoconf/spec.gmk.in	Wed Jul 05 21:29:18 2017 +0200
@@ -355,6 +355,9 @@
 WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
 
 CFLAGS_CCACHE:=@CFLAGS_CCACHE@
+NO_NULL_POINTER_CHECK_FLAG=@NO_NULL_POINTER_CHECK_CFLAG@
+NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
+CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
 
 # Tools that potentially need to be cross compilation aware.
 CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
--- a/common/autoconf/toolchain.m4	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/autoconf/toolchain.m4	Wed Jul 05 21:29:18 2017 +0200
@@ -92,11 +92,11 @@
   REFERENCE_VERSION=ARG_VERSION
 
   if [ [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ]; then
-    AC_MSG_ERROR([Internal errror: Cannot compare to ARG_VERSION, only three parts (X.Y.Z) is supported])
+    AC_MSG_ERROR([Internal error: Cannot compare to ARG_VERSION, only three parts (X.Y.Z) is supported])
   fi
 
   if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then
-    AC_MSG_ERROR([Internal errror: Cannot compare to ARG_VERSION, only parts < 99999 is supported])
+    AC_MSG_ERROR([Internal error: Cannot compare to ARG_VERSION, only parts < 99999 is supported])
   fi
 
   # Version comparison method inspired by http://stackoverflow.com/a/24067243
@@ -403,7 +403,7 @@
     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
         $SED -e 's/ *Copyright .*//'`
     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
-        $SED -e 's/^.* \(@<:@1-9@:>@\.@<:@0-9.@:>@*\) .*$/\1/'`
+        $SED -e 's/^.* \(@<:@1-9@:>@\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'`
   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
     # clang --version output typically looks like
     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
--- a/common/conf/jib-profiles.js	Wed Mar 23 21:44:35 2016 -0700
+++ b/common/conf/jib-profiles.js	Wed Jul 05 21:29:18 2017 +0200
@@ -217,6 +217,7 @@
         configure_args: ["--with-default-make-target=all"],
         configure_args_32bit: ["--with-target-bits=32", "--with-jvm-variants=client,server"],
         configure_args_debug: ["--enable-debug"],
+        configure_args_slowdebug: ["--with-debug-level=slowdebug"],
         organization: "jpg.infra.builddeps"
     };
 
@@ -241,6 +242,7 @@
             target_cpu: "x64",
             dependencies: concat(common.dependencies, "devkit"),
             configure_args: common.configure_args,
+	    configure_args: concat(common.configure_args, "--with-zlib=system"),
             make_args: common.make_args
         },
 
@@ -250,6 +252,7 @@
             build_cpu: "x64",
             dependencies: concat(common.dependencies, "devkit"),
             configure_args: concat(common.configure_args, common.configure_args_32bit),
+	    configure_args: concat(common.configure_args, "--with-zlib=system"),
             make_args: common.make_args
         },
 
@@ -258,6 +261,7 @@
             target_cpu: "x64",
             dependencies: concat(common.dependencies, "devkit"),
             configure_args: common.configure_args,
+	    configure_args: concat(common.configure_args, "--with-zlib=system"),
             make_args: common.make_args
         },
 
@@ -266,6 +270,7 @@
             target_cpu: "x64",
             dependencies: concat(common.dependencies, "devkit", "cups"),
             configure_args: common.configure_args,
+	    configure_args: concat(common.configure_args, "--with-zlib=system"),
             make_args: common.make_args
         },
 
@@ -274,6 +279,7 @@
             target_cpu: "sparcv9",
             dependencies: concat(common.dependencies, "devkit", "cups"),
             configure_args: common.configure_args,
+	    configure_args: concat(common.configure_args, "--with-zlib=system"),
             make_args: common.make_args
         },
 
@@ -297,53 +303,28 @@
     profiles = concatObjects(profiles, mainProfiles);
     // Generate debug versions of all the main profiles
     profiles = concatObjects(profiles, generateDebugProfiles(common, mainProfiles));
+    // Generate slowdebug versions of all the main profiles
+    profiles = concatObjects(profiles, generateSlowdebugProfiles(common, mainProfiles));
 
-    // Specific open profiles needed for JPRT testing
-    var jprtOpenProfiles = {
-
+    // Generate open only profiles for all the main profiles for JPRT and reference
+    // implementation builds.
+    var openOnlyProfiles = generateOpenOnlyProfiles(common, mainProfiles);
+    // The open only profiles on linux are used for reference builds and should
+    // produce the compact profile images by default.
+    var openOnlyProfilesExtra = {
         "linux-x64-open": {
-            target_os: mainProfiles["linux-x64"].target_os,
-            target_cpu: mainProfiles["linux-x64"].target_cpu,
-            dependencies: mainProfiles["linux-x64"].dependencies,
-            configure_args: concat(mainProfiles["linux-x64"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["linux-x64"].make_args,
-            labels: [ "open" ]
+            configure_args: ["--with-default-make-target=all profiles"],
         },
 
         "linux-x86-open": {
-            target_os: mainProfiles["linux-x86"].target_os,
-            target_cpu: mainProfiles["linux-x86"].target_cpu,
-            dependencies: mainProfiles["linux-x86"].dependencies,
-            configure_args: concat(mainProfiles["linux-x86"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["linux-x86"].make_args,
-            labels: [ "open" ]
-        },
-
-        "solaris-x64-open": {
-            target_os: mainProfiles["solaris-x64"].target_os,
-            target_cpu: mainProfiles["solaris-x64"].target_cpu,
-            dependencies: mainProfiles["solaris-x64"].dependencies,
-            configure_args: concat(mainProfiles["solaris-x64"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["solaris-x64"].make_args,
-            labels: [ "open" ]
-        },
-
-        "windows-x86-open": {
-            target_os: mainProfiles["windows-x86"].target_os,
-            target_cpu: mainProfiles["windows-x86"].target_cpu,
-            dependencies: mainProfiles["windows-x86"].dependencies,
-            configure_args: concat(mainProfiles["windows-x86"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["windows-x86"].make_args,
-            labels: [ "open" ]
+            configure_args: ["--with-default-make-target=all profiles"],
         }
     };
-    profiles = concatObjects(profiles, jprtOpenProfiles);
+    var openOnlyProfiles = concatObjects(openOnlyProfiles, openOnlyProfilesExtra);
+
+    profiles = concatObjects(profiles, openOnlyProfiles);
     // Generate debug profiles for the open jprt profiles
-    profiles = concatObjects(profiles, generateDebugProfiles(common, jprtOpenProfiles));
+    profiles = concatObjects(profiles, generateDebugProfiles(common, openOnlyProfiles));
 
     // Profiles used to run tests. Used in JPRT.
     var testOnlyProfiles = {
@@ -502,6 +483,51 @@
 };
 
 /**
+ * Generates slowdebug versions of profiles. Clones the given profiles and adds
+ * debug metadata.
+ *
+ * @param common Common values
+ * @param profiles Profiles map to generate debug profiles for
+ * @returns {{}} New map of profiles containing debug profiles
+ */
+var generateSlowdebugProfiles = function (common, profiles) {
+    var newProfiles = {};
+    for (var profile in profiles) {
+        var debugProfile = profile + "-slowdebug";
+        newProfiles[debugProfile] = clone(profiles[profile]);
+        newProfiles[debugProfile].debug_level = "slowdebug";
+        newProfiles[debugProfile].labels
+            = concat(newProfiles[debugProfile].labels || [], "slowdebug"),
+            newProfiles[debugProfile].configure_args
+                = concat(newProfiles[debugProfile].configure_args,
+                common.configure_args_slowdebug);
+    }
+    return newProfiles;
+};
+
+/**
+ * Generates open only versions of profiles. Clones the given profiles and adds
+ * open metadata.
+ *
+ * @param common Common values
+ * @param profiles Profiles map to generate open only profiles for
+ * @returns {{}} New map of profiles containing open only profiles
+ */
+var generateOpenOnlyProfiles = function (common, profiles) {
+    var newProfiles = {};
+    for (var profile in profiles) {
+        var openProfile = profile + "-open";
+        newProfiles[openProfile] = clone(profiles[profile]);
+        newProfiles[openProfile].labels
+            = concat(newProfiles[openProfile].labels || [], "open"),
+            newProfiles[openProfile].configure_args
+                = concat(newProfiles[openProfile].configure_args,
+                "--enable-openjdk-only");
+    }
+    return newProfiles;
+};
+
+/**
  * Deep clones an object tree.
  *
  * @param o Object to clone
--- a/make/Images.gmk	Wed Mar 23 21:44:35 2016 -0700
+++ b/make/Images.gmk	Wed Jul 05 21:29:18 2017 +0200
@@ -38,61 +38,23 @@
 
 ############################################################################
 
-MAIN_MODULES += java.se.ee java.smartcardio jdk.httpserver jdk.sctp \
-               jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom \
-               jdk.accessibility jdk.internal.le jdk.dynalink \
-               jdk.scripting.nashorn jdk.scripting.nashorn.shell \
-               jdk.vm.ci jdk.management jdk.jsobject
-
-# providers
-PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.jvmstat.rmi \
-               jdk.localedata jdk.naming.dns jdk.naming.rmi jdk.zipfs
-
-# tools
-TOOLS_MODULES += jdk.attach jdk.compiler \
-               jdk.javadoc jdk.jcmd jdk.jconsole jdk.hotspot.agent jdk.jartool \
-               jdk.jdeps jdk.jdi jdk.jdwp.agent jdk.jlink jdk.jshell \
-               jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws jdk.internal.opt
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  PROVIDER_MODULES += jdk.crypto.mscapi
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  PROVIDER_MODULES += jdk.crypto.ucrypto
-endif
+# All modules for the current target platform.
+ALL_MODULES := $(call FindAllModules)
 
-JRE_MODULES := $(filter-out $(MODULES_FILTER), $(MAIN_MODULES) $(PROVIDER_MODULES))
-JDK_MODULES := $(filter-out $(MODULES_FILTER), $(JRE_MODULES) $(TOOLS_MODULES))
+$(eval $(call ReadImportMetaData))
 
-# Param 1 - Name of module
-define ReadImportMetaData
-  ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), )
-    include_in_jre :=
-    include_in_jdk :=
-    include $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties
-    ifeq ($$(include_in_jre), true)
-      JRE_MODULES += $1
-    endif
-    ifeq ($$(include_in_jdk), true)
-      JDK_MODULES += $1
-    endif
-  else
-    # Default to include in all
-    JRE_MODULES += $1
-    JDK_MODULES += $1
-  endif
-endef
-
-IMPORTED_MODULES := $(call FindImportedModules)
-$(foreach m, $(IMPORTED_MODULES), $(eval $(call ReadImportMetaData, $m)))
+JRE_MODULES += $(filter-out $(MODULES_FILTER), $(BOOT_MODULES) $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
+JDK_MODULES += $(filter-out $(MODULES_FILTER), $(ALL_MODULES))
 
 # Compact builds have additional modules
-COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
-JRE_COMPACT1_MODULES := $(COMPACT_EXTRA_MODULES) java.compact1
-JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 jdk.xml.dom jdk.httpserver
-JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 java.smartcardio jdk.management \
-                        jdk.naming.dns jdk.naming.rmi jdk.sctp jdk.security.auth
+COMPACT1_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
+COMPACT2_EXTRA_MODULES := jdk.xml.dom jdk.httpserver
+COMPACT3_EXTRA_MODULES := java.smartcardio jdk.management \
+    jdk.naming.dns jdk.naming.rmi jdk.sctp jdk.security.auth
+
+JRE_COMPACT1_MODULES := java.compact1 $(COMPACT1_EXTRA_MODULES)
+JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 $(COMPACT2_EXTRA_MODULES)
+JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 $(COMPACT3_EXTRA_MODULES)
 
 # Replacing double-comma with a single comma is to workaround the issue
 # with some version of make on windows that doesn't substitute spaces
--- a/make/common/Modules.gmk	Wed Mar 23 21:44:35 2016 -0700
+++ b/make/common/Modules.gmk	Wed Jul 05 21:29:18 2017 +0200
@@ -26,11 +26,109 @@
 ifndef _MODULES_GMK
 _MODULES_GMK := 1
 
+################################################################################
+#
+# BOOT_MODULES are modules defined by the boot loader
+# PLATFORM_MODULES are modules defined by the platform loader
+# JRE_TOOL_MODULES are tools included in JRE and defined by the application loader
+#
+# All other modules not declared below are defined by the application loader
+# and are not included in JRE.
+
+BOOT_MODULES :=
+PLATFORM_MODULES :=
+JRE_TOOL_MODULES :=
+
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , common/Modules.gmk))
 
+UPGRADEABLE_MDOULES :=
+AGGREGATOR_MDOULES :=
+
+BOOT_MODULES += \
+    java.base \
+    java.datatransfer \
+    java.desktop \
+    java.httpclient \
+    java.instrument \
+    java.logging \
+    java.management \
+    java.naming \
+    java.prefs \
+    java.rmi \
+    java.security.jgss \
+    java.security.sasl \
+    java.sql \
+    java.xml \
+    java.xml.crypto \
+    jdk.httpserver \
+    jdk.management \
+    jdk.sctp \
+    jdk.security.auth \
+    jdk.security.jgss \
+    jdk.vm.ci \
+    #
+
+# to be deprivileged
+BOOT_MODULES += \
+    java.compiler \
+    java.scripting \
+    java.sql.rowset \
+    java.smartcardio \
+    jdk.charsets \
+    jdk.naming.rmi \
+    #
+
+UPGRADEABLE_MODULES += \
+    java.activation \
+    java.annotations.common \
+    java.corba \
+    java.transaction \
+    java.xml.bind \
+    java.xml.ws \
+    #
+
+AGGREGATOR_MODULES += \
+    java.compact1 \
+    java.compact2 \
+    java.compact3 \
+    java.se \
+    java.se.ee \
+    #
+
+PLATFORM_MODULES += \
+    $(UPGRADEABLE_MODULES) \
+    $(AGGREGATOR_MODULES)
+    #
+
+PLATFORM_MODULES += \
+    jdk.accessibility \
+    jdk.crypto.ec \
+    jdk.crypto.pkcs11 \
+    jdk.dynalink \
+    jdk.jsobject \
+    jdk.xml.dom \
+    jdk.localedata \
+    jdk.naming.dns \
+    jdk.scripting.nashorn \
+    jdk.zipfs \
+    #
+
+JRE_TOOL_MODULES += \
+    jdk.pack200 \
+    jdk.scripting.nashorn.shell \
+    #
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  PLATFORM_MODULES += jdk.crypto.mscapi
+endif
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  PLATFORM_MODULES += jdk.crypto.ucrypto
+endif
+
 ################################################################################
 # Some platforms don't have the serviceability agent
+
 ifeq ($(INCLUDE_SA), false)
   MODULES_FILTER += jdk.hotspot.agent
 endif
@@ -120,4 +218,44 @@
 
 ################################################################################
 
+# Param 1 - Name of module
+define ReadSingleImportMetaData
+    ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), )
+      classloader :=
+      include_in_jre :=
+      include_in_jdk :=
+      include $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties
+      ifeq ($$(include_in_jre), true)
+        JRE_MODULES += $1
+      endif
+      ifeq ($$(include_in_jdk), true)
+        JDK_MODULES += $1
+      endif
+      ifeq ($$(classloader), boot)
+        BOOT_MODULES += $1
+      else ifeq ($$(classloader), ext)
+        PLATFORM_MODULES += $1
+      endif
+    else
+      # Default to include in all
+      JRE_MODULES += $1
+      JDK_MODULES += $1
+    endif
+endef
+
+# Reading the imported modules metadata has a cost, so to make it available,
+# a makefile needs to eval-call this macro first. After calling this, the
+# following variables are populated with data from the imported modules:
+# * JRE_MODULES
+# * JDK_MODULES
+# * BOOT_MODULES
+# * PLATFORM_MODULES
+# * JRE_TOOL_MODULES
+define ReadImportMetaData
+    IMPORTED_MODULES := $(call FindImportedModules)
+    $(foreach m, $(IMPORTED_MODULES), $(eval $(call ReadImportMetaData, $m)))
+endef
+
+################################################################################
+
 endif # _MODULES_GMK
--- a/make/common/NativeCompilation.gmk	Wed Mar 23 21:44:35 2016 -0700
+++ b/make/common/NativeCompilation.gmk	Wed Jul 05 21:29:18 2017 +0200
@@ -238,7 +238,10 @@
       -include $$($1_$2_DEP_TARGETS)
 
       ifeq ($(TOOLCHAIN_TYPE), microsoft)
-        $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ))
+        # To avoid name clashes between pdbs for objects and libs/execs, put
+        # object pdbs in a separate subdir.
+        $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \
+            $$($1_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ))))
       endif
     endif
 
@@ -250,7 +253,7 @@
 
     $$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO)
 	$$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET))))
-	$$(call MakeDir, $$(@D))
+	$$(call MakeDir, $$(@D) $$(@D)/pdb)
         ifneq ($(TOOLCHAIN_TYPE), microsoft)
           ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio)
             # The Solaris studio compiler doesn't output the full path to the object file in the
@@ -711,7 +714,7 @@
 
         # Generate debuginfo files.
         ifeq ($(OPENJDK_TARGET_OS), windows)
-          $1_EXTRA_LDFLAGS += "-pdb:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb" \
+          $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb" \
               "-map:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map"
           $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \
               $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map
--- a/make/devkit/Tools.gmk	Wed Mar 23 21:44:35 2016 -0700
+++ b/make/devkit/Tools.gmk	Wed Jul 05 21:29:18 2017 +0200
@@ -83,8 +83,9 @@
     libXdmcp libXdmcp-devel \
     libXau libXau-devel \
     libgcc \
-    elfutils elfutils-devel \
-    elfutils-libelf elfutils-libelf-devel
+    elfutils elfutils-libs elfutils-devel \
+    elfutils-libelf elfutils-libelf-devel \
+    zlib zlib-devel
 
 
 ifeq ($(ARCH),x86_64)
--- a/make/jprt.properties	Wed Mar 23 21:44:35 2016 -0700
+++ b/make/jprt.properties	Wed Jul 05 21:29:18 2017 +0200
@@ -79,12 +79,12 @@
 
 # Setup jib profiles
 jprt.linux_i586.product.build.jib.profile=linux-x86
-jprt.linux_x64.build.jib.profile=linux-x64
-jprt.macosx_x64.build.jib.profile=macosx-x64
-jprt.solaris_sparcv9.build.jib.profile=solaris-sparcv9
-jprt.solaris_x64.build.jib.profile=solaris-x64
-jprt.windows_i586.build.jib.profile=windows-x86
-jprt.windows_x64.build.jib.profile=windows-x64
+jprt.linux_x64.product.build.jib.profile=linux-x64
+jprt.macosx_x64.product.build.jib.profile=macosx-x64
+jprt.solaris_sparcv9.product.build.jib.profile=solaris-sparcv9
+jprt.solaris_x64.product.build.jib.profile=solaris-x64
+jprt.windows_i586.product.build.jib.profile=windows-x86
+jprt.windows_x64.product.build.jib.profile=windows-x64
 
 jprt.linux_i586.fastdebug.build.jib.profile=linux-x86-debug
 jprt.linux_x64.fastdebug.build.jib.profile=linux-x64-debug
@@ -94,25 +94,47 @@
 jprt.windows_i586.fastdebug.build.jib.profile=windows-x86-debug
 jprt.windows_x64.fastdebug.build.jib.profile=windows-x64-debug
 
-jprt.solaris_x64.debugOpen.build.jib.profile=solaris-x64-open-debug
+jprt.linux_i586.slowdebug.build.jib.profile=linux-x86-slowdebug
+jprt.linux_x64.slowdebug.build.jib.profile=linux-x64-slowdebug
+jprt.macosx_x64.slowdebug.build.jib.profile=macosx-x64-slowdebug
+jprt.solaris_sparcv9.slowdebug.build.jib.profile=solaris-sparcv9-slowdebug
+jprt.solaris_x64.slowdebug.build.jib.profile=solaris-x64-slowdebug
+jprt.windows_i586.slowdebug.build.jib.profile=windows-x86-slowdebug
+jprt.windows_x64.slowdebug.build.jib.profile=windows-x64-slowdebug
+
+jprt.linux_i586.productOpen.build.jib.profile=linux-x86-open
 jprt.linux_x64.productOpen.build.jib.profile=linux-x64-open
+jprt.macosx_x64.productOpen.build.jib.profile=macosx-x64-open
+jprt.solaris_sparcv9.productOpen.build.jib.profile=solaris-sparcv9-open
+jprt.solaris_x64.productOpen.build.jib.profile=solaris-x64-open
+jprt.windows_i586.productOpen.build.jib.profile=windows-x86-open
+jprt.windows_x64.productOpen.build.jib.profile=windows-x64-open
+
+jprt.linux_i586.fastdebugOpen.build.jib.profile=linux-x86-open-debug
+jprt.linux_x64.fastdebugOpen.build.jib.profile=linux-x64-open-debug
+jprt.macosx_x64.fastdebugOpen.build.jib.profile=macosx-x64-open-debug
+jprt.solaris_sparcv9.fastdebugOpen.build.jib.profile=solaris-sparcv9-open-debug
+jprt.solaris_x64.fastdebugOpen.build.jib.profile=solaris-x64-open-debug
+jprt.windows_i586.fastdebugOpen.build.jib.profile=windows-x86-open-debug
+jprt.windows_x64.fastdebugOpen.build.jib.profile=windows-x64-open-debug
 
 jprt.test.jib.profile=run-test
 
 # Set make target to use for different build flavors
-jprt.build.flavor.debugOpen.target=jprt_bundle
+jprt.build.flavor.fastdebugOpen.target=jprt_bundle
 jprt.build.flavor.fastdebug.target=jprt_bundle
 jprt.build.flavor.product.target=jprt_bundle
 jprt.build.flavor.productOpen.target=jprt_bundle
 jprt.build.flavor.optimized.target=jprt_bundle
 jprt.build.flavor.optimizedOpen.target=jprt_bundle
+jprt.build.flavor.slowdebug.target=jprt_bundle
 
 # Use these configure args to define debug level
-jprt.debug.build.configure.args=
+jprt.slowdebug.build.configure.args=
 jprt.fastdebug.build.configure.args=--disable-precompiled-headers
 jprt.product.build.configure.args=
 jprt.optimized.build.configure.args=--with-debug-level=optimized
-jprt.debugOpen.build.configure.args=${jprt.debug.build.configure.args}
+jprt.slowdebugOpen.build.configure.args=${jprt.slowdebug.build.configure.args}
 jprt.fastdebugOpen.build.configure.args=${jprt.fastdebug.build.configure.args}
 jprt.productOpen.build.configure.args=${jprt.product.build.configure.args}
 jprt.optimizedOpen.build.configure.args=${jprt.product.build.configure.args}
@@ -121,6 +143,8 @@
 # hotspot testset has custom build flavors and build targets
 my.jprt.testsetHasCustomBuildFlavors.hotspot=true
 my.jprt.testsetHasCustomBuildTargets.hotspot=true
+my.jprt.testsetHasCustomBuildFlavors.buildinfra=true
+my.jprt.testsetHasCustomBuildTargets.buildinfra=true
 
 # determine if the specified testset has custom build flavors or build targets
 my.jprt.testsetHasCustomBuildFlavors=${my.jprt.testsetHasCustomBuildFlavors.${jprt.test.set}}
@@ -282,7 +306,7 @@
 
 # The hotspot build flavors
 my.build.flavors.hotspot=						\
-    debugOpen,fastdebug,product,productOpen,optimized,optimizedOpen \
+    fastdebugOpen,fastdebug,product,productOpen,optimized,optimizedOpen \
     ${my.additional.build.flavors.hotspot}
 
 # Platforms built for hotspot push jobs
@@ -294,7 +318,7 @@
     macosx_x64_10.9-{product|fastdebug},				\
     windows_i586_6.3-{product|fastdebug},				\
     windows_x64_6.3-{product|fastdebug},			\
-    solaris_x64_5.11-{debugOpen},					\
+    solaris_x64_5.11-{fastdebugOpen},					\
     linux_x64_3.8-{productOpen},					\
     ${my.additional.build.targets.hotspot}
 
@@ -458,3 +482,28 @@
 
 # Install the test bundle for the nativesanity jtreg tests
 my.jprt.test.bundle.targets.nativesanity=${my.make.rule.test.targets.nativesanity}
+
+################################################################################
+# Testset buildinfra
+my.build.flavors.buildinfra = \
+    product,fastdebug,slowdebug, \
+    ${my.additional.build.flavors.buildinfra}
+
+# Platforms built for hotspot push jobs
+my.build.targets.buildinfra = \
+    solaris_sparcv9_5.11-{product|fastdebug|slowdebug}, \
+    solaris_x64_5.11-{product|fastdebug|slowdebug}, \
+    linux_i586_3.8-{product|fastdebug|slowdebug}, \
+    linux_x64_3.8-{product|fastdebug|slowdebug}, \
+    macosx_x64_10.9-{product|fastdebug|slowdebug}, \
+    windows_i586_6.3-{product|fastdebug|slowdebug}, \
+    windows_x64_6.3-{product|fastdebug|slowdebug}, \
+    ${my.additional.build.targets.buildinfra}
+
+my.test.targets.buildinfra = \
+    ${my.test.targets.default}, \
+    ${my.test.targets.hotspot}
+
+my.make.rule.test.targets.buildinfra = \
+    ${my.make.rule.test.targets.default}, \
+    ${my.make.rule.test.targets.hotspot}
--- a/test/lib/sun/hotspot/WhiteBox.java	Wed Mar 23 21:44:35 2016 -0700
+++ b/test/lib/sun/hotspot/WhiteBox.java	Wed Jul 05 21:29:18 2017 +0200
@@ -465,4 +465,8 @@
   public native boolean isShared(Object o);
   public native boolean isSharedClass(Class<?> c);
   public native boolean areSharedStringsIgnored();
+
+  // Compiler Directive
+  public native int addCompilerDirective(String compDirect);
+  public native void removeCompilerDirective(int count);
 }